Replace LHV JKS store with P12

This commit is contained in:
Karl Erik Õunapuu 2020-07-27 11:48:51 +03:00
parent 65a749edc8
commit 64def385b0
4 changed files with 16 additions and 18 deletions

View file

@ -3,12 +3,9 @@ namespace :dev do
remitter_iban = ENV['remitter_iban']
beneficiary_iban = Setting.registry_iban
keystore_password = ENV['lhv_keystore_password']
keystore_alias = ENV['lhv_keystore_alias']
keystore = Keystores::JavaKeystore.new
keystore.load(ENV['lhv_keystore'], keystore_password)
cert = keystore.get_certificate(keystore_alias)
key = keystore.get_key(keystore_alias, keystore_password)
keystore = OpenSSL::PKCS12.new(File.read(ENV['lhv_p12_keystore']), ENV['lhv_keystore_password'])
key = keystore.key
cert = keystore.certificate
api_base_uri = URI.parse('https://testconnect.lhv.eu/connect-prelive')
request_headers = { 'content-type' => 'application/xml' }
@ -38,4 +35,4 @@ namespace :dev do
end
end
end
end
end