You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenSSL::Error calls ERR_get_error in its #initialize to obtain the error on the current thread's OpenSSL error queue, but not all functions signal failure this way. For example, EVP_get_digestbyname, which is used by OpenSSL::Digest.new, simply returns a null pointer, and you get a rather confusing exception message:
require"openssl"OpenSSL::Digest.new("abc") # Unsupported digest algorithm: abc: Unknown or no error (OpenSSL::Digest::UnsupportedError)
This can be suppressed by passing fetched: true when constructing the exception, although this doesn't appear to have been used publicly, other than in OpenSSL::SSL::Error:
OpenSSL::Error
callsERR_get_error
in its#initialize
to obtain the error on the current thread's OpenSSL error queue, but not all functions signal failure this way. For example,EVP_get_digestbyname
, which is used byOpenSSL::Digest.new
, simply returns a null pointer, and you get a rather confusing exception message:This can be suppressed by passing
fetched: true
when constructing the exception, although this doesn't appear to have been used publicly, other than inOpenSSL::SSL::Error
:We need to go through the OpenSSL documentation to see which functions actually need
ERR_get_error
and which ones do not.The text was updated successfully, but these errors were encountered: