[ruby/openssl] asn1integer_to_num: don't cast away const

ASN1_ENUMERATED_to_BN() has been const-correct for a long time in all
supported libcrytos, so we can remove this workaround.

https://github.com/ruby/openssl/commit/d0f36a7c65
This commit is contained in:
Theo Buehler 2025-12-06 17:58:56 +01:00 committed by git
parent 1f0d41aa4d
commit 47c0dae188

View File

@ -131,8 +131,7 @@ asn1integer_to_num(const ASN1_INTEGER *ai)
ossl_raise(rb_eTypeError, "ASN1_INTEGER is NULL!");
}
if (ASN1_STRING_type(ai) == V_ASN1_ENUMERATED)
/* const_cast: workaround for old OpenSSL */
bn = ASN1_ENUMERATED_to_BN((ASN1_ENUMERATED *)ai, NULL);
bn = ASN1_ENUMERATED_to_BN(ai, NULL);
else
bn = ASN1_INTEGER_to_BN(ai, NULL);