We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1c4bfef + 309c55d commit 1e9cfebCopy full SHA for 1e9cfeb
ext/openssl/ossl_asn1.c
@@ -130,15 +130,17 @@ asn1integer_to_num(const ASN1_INTEGER *ai)
130
if (!ai) {
131
ossl_raise(rb_eTypeError, "ASN1_INTEGER is NULL!");
132
}
133
+
134
+ num = ossl_bn_new(BN_value_one());
135
+ bn = GetBNPtr(num);
136
137
if (ASN1_STRING_type(ai) == V_ASN1_ENUMERATED)
- bn = ASN1_ENUMERATED_to_BN(ai, NULL);
138
+ bn = ASN1_ENUMERATED_to_BN(ai, bn);
139
else
- bn = ASN1_INTEGER_to_BN(ai, NULL);
140
+ bn = ASN1_INTEGER_to_BN(ai, bn);
141
142
if (!bn)
143
ossl_raise(eOSSLError, NULL);
- num = ossl_bn_new(bn);
- BN_free(bn);
144
145
return num;
146
0 commit comments