summaryrefslogtreecommitdiff
path: root/lib/license
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-05-05 17:03:46 -0600
committermo khan <mo.khan@gmail.com>2020-05-05 17:03:46 -0600
commit100b925e97be4ff8bf9e09850df6a3cee536e4c6 (patch)
tree41f2ca4ec03d1644b7eca6ac937f426cf09cc58b /lib/license
parentb8528fe5d1a726ad21cf52a10afaf9ca189e8ccb (diff)
Extract variable for keystore_path
Diffstat (limited to 'lib/license')
-rw-r--r--lib/license/management/shell.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/license/management/shell.rb b/lib/license/management/shell.rb
index 7baa6ba..9053a3f 100644
--- a/lib/license/management/shell.rb
+++ b/lib/license/management/shell.rb
@@ -48,6 +48,7 @@ module License
Dir.glob('custom.*.crt').each do |path|
full_path = File.expand_path(path)
execute([:openssl, :x509, '-in', full_path, '-text', '-noout'])
+ keystore_path = "#{ENV['JAVA_HOME']}/jre/lib/security/cacerts"
execute([
:keytool,
'-importcert',
@@ -56,12 +57,12 @@ module License
'-trustcacerts',
'-noprompt',
'-storepass', 'changeit',
- '-keystore', "#{ENV['JAVA_HOME']}/jre/lib/security/cacerts"
+ '-keystore', keystore_path
])
execute([
:keytool, '-list', '-v',
'-storepass changeit',
- '-keystore', "#{ENV['JAVA_HOME']}/jre/lib/security/cacerts"
+ '-keystore', keystore_path
])
end
end