Skip to content

Commit 8b1a992

Browse files
committed
(maint) Drop private key passphrase workaround
Ruby 2.4.0 and 2.4.1 required a password of at least 4 bytes to prevent openssl from prompting for a passphrase, even if one wasn't required. This was fixed in ruby/openssl 2.0.5, which was first included in ruby 2.5.0[1], so we can drop our workaround. [1] ruby/ruby@df94c66
1 parent fc8dd47 commit 8b1a992

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/puppet/x509/cert_provider.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,7 @@ def load_private_key(name, required: false, password: nil)
207207
# @api private
208208
def load_private_key_from_pem(pem, password: nil)
209209
# set a non-nil password to ensure openssl doesn't prompt
210-
# but ruby 2.4.0 & 2.4.1 require at least 4 bytes due to
211-
# https://github.com/ruby/openssl/commit/f38501249f33bff7ca9d208670b8cde695ea8b7b
212-
# and corrected in https://github.com/ruby/openssl/commit/a896c3d1dfa090e92dec1abf8ac12843af6af721
213-
password ||= ' '
210+
password ||= ''
214211

215212
# Can't use OpenSSL::PKey.read, because it's broken in MRI 2.3, doesn't exist
216213
# in JRuby 9.1, and is broken in JRuby 9.2

0 commit comments

Comments
 (0)