Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Nov 6, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

rhenium and others added 11 commits November 6, 2025 13:25
Use explicit strings instead of relying on OpenSSL::ASN1::ObjectId
methods. It is reduced to just SHA-256 because testing other algorithms
does not improve test coverage for ruby/openssl.

ruby/openssl@dcfd2e7b97
We generally raise OpenSSL::OpenSSLError or its subclass for errors
originating from the OpenSSL library, which may include extra details
appended by ossl_raise().

ruby/openssl@9427a05ce5
Raise OpenSSL::Cipher::CipherError instead of ArgumentError or
RuntimeError for consistency.

ruby/openssl@78601c9c34
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.

ruby/openssl@9fc2179403
Likewise, use EVP_MD_fetch() if it is available.

This adds support for AES-GCM-SIV with OpenSSL 3.2 or later.

ruby/openssl@0e565a215e
Fixes [#Bug 21660], followup to ruby/prism#3674

ruby/prism@fb445a49e5

Co-Authored-By: tomoya ishida <tomoyapenguin@gmail.com>
Remove the following subclasses of OpenSSL::PKey::PKeyError and make
them aliases of it.

 - OpenSSL::PKey::DHError
 - OpenSSL::PKey::DSAError
 - OpenSSL::PKey::ECError
 - OpenSSL::PKey::RSAError

Historically, methods defined on OpenSSL::PKey and OpenSSL::PKey::PKey
raise OpenSSL::PKey::PKeyError, while methods on the subclasses raise
their respective exception classes. However, this distinction is not
particularly useful since all those exception classes represent the
same kind of errors from the underlying EVP_PKEY API.

I think this convention comes from the fact that OpenSSL::PKey::{DH,
DSA,RSA} originally wrapped the corresponding OpenSSL structs DH, DSA,
and RSA, before they were unified to wrap EVP_PKEY, way back in 2002.

OpenSSL::PKey::EC::Group::Error and OpenSSL::PKey::EC::Point::Error
are out of scope of this change, as they are not subclasses of
OpenSSL::PKey::PKeyError and do not represent errors from the EVP_PKEY
API.

ruby/openssl@e74ff3e272
This is a follow-up to commit ruby/openssl@e74ff3e2722f, which missed the line added
in a different PR.

ruby/openssl@1b01d19456
ruby/openssl#958 changed the common logic for
digest algorithm lookup:

 - If the argument is neither an OpenSSL::Digest instance nor a String,
   it is now implicitly converted to String with #to_str. This is
   consistent with algorithm name lookup logic in ruby/openssl for pkeys
   and ciphers.

 - If the name is not recognized, OpenSSL::Digest::DigestError is raised
   instead of RuntimeError.

Update the specs accordingly:

 - Remove specs that expect #to_str not to be called.

 - Relax regexps matching TypeError messages.

 - Expect OpenSSL::Digest::DigestError instead of RuntimeError for
   ruby/openssl 4.0.0 and later.
We have both `SetIvar` and `SetInstanceVariable`. The former is a purely
dynamic fallback that we can inline `attr_accessor`/`attr_writer` into,
whereas the latter comes straight from the interpreter's
`setinstancevariable` opcode.
@pull pull bot locked and limited conversation to collaborators Nov 6, 2025
@pull pull bot added the ⤵️ pull label Nov 6, 2025
@pull pull bot merged commit ff6c728 into turkdevops:master Nov 6, 2025
1 check failed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants