Skip to content

Commit d0f36a7

Browse files
committed
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.
1 parent 4db2605 commit d0f36a7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/openssl/ossl_asn1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ asn1integer_to_num(const ASN1_INTEGER *ai)
131131
ossl_raise(rb_eTypeError, "ASN1_INTEGER is NULL!");
132132
}
133133
if (ASN1_STRING_type(ai) == V_ASN1_ENUMERATED)
134-
/* const_cast: workaround for old OpenSSL */
135-
bn = ASN1_ENUMERATED_to_BN((ASN1_ENUMERATED *)ai, NULL);
134+
bn = ASN1_ENUMERATED_to_BN(ai, NULL);
136135
else
137136
bn = ASN1_INTEGER_to_BN(ai, NULL);
138137

0 commit comments

Comments
 (0)