diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2017-07-21 15:35:46 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2017-07-22 21:58:56 +0900 |
commit | 96211a3e4ed8242832b74f166d6435144438bd43 (patch) | |
tree | 702ea51e49c0dc9dc753e0a7cadffd631f9d60af /LICENSE.txt | |
parent | 2a5ae3c7a53978145122a163e63a490a6a6c9993 (diff) | |
download | ruby-openssl-ky/pem-passwd-cb-get-rid-of-minlen.tar.gz |
ossl_pem_passwd_cb: handle nil from the block explicitlyky/pem-passwd-cb-get-rid-of-minlen
There is code that returns nil in the passphrase block on purpose (to
prevent OpenSSL from prompting on stdin):
OpenSSL::PKey.read(File.read("file.pem")) { nil }
This is working just by chance because the TypeError from StringValue()
is silently ignored. Let's short circuit in that case and save raising
a needless exception, as this pattern has become too common.
Diffstat (limited to 'LICENSE.txt')
0 files changed, 0 insertions, 0 deletions