mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
[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:
parent
1f0d41aa4d
commit
47c0dae188
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user