summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2025-08-13 03:08:22 +0900
committergit <svn-admin@ruby-lang.org>2025-09-12 12:26:07 +0000
commitc0820058243842d1391d896baf67914a8ea50e13 (patch)
treed7a585e13c62cde6e48a455c697e7e90de9ea8e1 /string.c
parent8af8582d4c3baf0ba41f8b54b43839ec8ba3dc3d (diff)
[ruby/openssl] pkey: stop retrying after non-retryable error from OSSL_DECODER
Continue processing only when OSSL_DECODER_from_bio() returns the error code ERR_R_UNSUPPORTED. Otherwise, raise an exception without retrying decoding the input in another format. This fixes another case where OpenSSL::PKey.read prompts for a passphrase multiple times when the input contains multiple passphrase-protected PEM blocks and the first one cannot be decoded. I am not entirely sure if the error code ERR_R_UNSUPPORTED is considered part of the public interface of OpenSSL, but this seems to be the only option available and is the approach used internally by the PEM_read_bio_*() functions. Fixes https://github.com/ruby/openssl/issues/927 https://github.com/ruby/openssl/commit/985ba27d63
Diffstat (limited to 'string.c')
0 files changed, 0 insertions, 0 deletions