summaryrefslogtreecommitdiff
path: root/include/ruby/assert.h
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2025-06-24 19:31:31 +0900
committergit <svn-admin@ruby-lang.org>2025-11-06 13:25:09 +0000
commit10d2311e136212549d36f90ec7cb86108e682088 (patch)
tree672f21fc435e46448320c5185187b83cf4be85a7 /include/ruby/assert.h
parent26751e40857be6faf91d0c87362ebae769f51faa (diff)
[ruby/openssl] digest: use EVP_MD_fetch() if available
With the introduction of OpenSSL 3 providers, newly implemented algorithms do not necessarily have a corresponding NID assigned. To use such an algorithm, it has to be "fetched" from providers using the new EVP_*_fetch() functions. For digest algorithms, we have to use EVP_MD_fetch() instead of the existing EVP_get_digestbyname(). However, it is not a drop-in replacement because: - EVP_MD_fetch() does not support all algorithm name aliases recognized by EVP_get_digestbyname(). - Both return an EVP_MD, but the one returned by EVP_MD_fetch() is sometimes reference counted and the user has to explicitly release it with EVP_MD_free(). So, keep using EVP_get_digestbyname() for all OpenSSL versions for now, and fall back to EVP_MD_fetch() if it fails. In the latter case, prepare a T_DATA object to manage the fetched EVP_MD's lifetime. https://github.com/ruby/openssl/commit/9fc2179403
Diffstat (limited to 'include/ruby/assert.h')
0 files changed, 0 insertions, 0 deletions