diff options
| author | Kazuki Yamaguchi <k@rhe.jp> | 2025-12-04 23:15:57 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-12-13 16:57:53 +0000 |
| commit | e8d32dddc04b34e2454b1c37b271bc242dddb06e (patch) | |
| tree | 803d6759907ec64fe5e21fc586ef254ed90e67cb /include/ruby | |
| parent | 6513cf9058978e06eb3433fa33c8f70bd1100352 (diff) | |
[ruby/openssl] ossl.c: implement OpenSSL::OpenSSLError#detailed_message
An OpenSSL function sometimes puts more than one error entry into the
thread-local OpenSSL error queue. Currently, we use the highest-level
entry for generating the exception message and discard the rest.
Let ossl_make_error() capture all current OpenSSL error queue contents
into OpenSSL::OpenSSLError#errors and extend
OpenSSL::OpenSSLError#detailed_message to include the information.
An example:
$ ruby -Ilib -ropenssl -e'OpenSSL::X509::ExtensionFactory.new.create_ext("a", "b")'
-e:1:in 'OpenSSL::X509::ExtensionFactory#create_ext': a = b: error in extension (name=a, value=b) (OpenSSL::X509::ExtensionError)
OpenSSL error queue reported 2 errors:
error:11000082:X509 V3 routines:do_ext_nconf:unknown extension name
error:11000080:X509 V3 routines:X509V3_EXT_nconf_int:error in extension (name=a, value=b)
from -e:1:in '<main>'
https://github.com/ruby/openssl/commit/d28f7a9a13
Diffstat (limited to 'include/ruby')
0 files changed, 0 insertions, 0 deletions
