From ee9017504a7420ea5d80c9d7a5f1e998e65c9258 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Sat, 11 Jan 2020 15:45:20 -0800 Subject: + Load encrypted private key using ENV['GEM_PRIVATE_KEY_PASSPHRASE'] as passphrase. (larskanis) [git-p4: depot-paths = "//src/hoe/dev/": change = 12494] --- lib/hoe/signing.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/hoe/signing.rb b/lib/hoe/signing.rb index 73a5761..36f2e0a 100644 --- a/lib/hoe/signing.rb +++ b/lib/hoe/signing.rb @@ -72,7 +72,8 @@ module Hoe::Signing end if signing_key and cert_chain then - spec.signing_key = OpenSSL::PKey::RSA.new File.read signing_key + passphrase = ENV['GEM_PRIVATE_KEY_PASSPHRASE'] + spec.signing_key = OpenSSL::PKey::RSA.new(File.read(signing_key), passphrase) spec.cert_chain = cert_chain end end -- cgit v1.2.1