You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
openssl_error handles errors through ERR_get_error.
So openssl should set error inside of method.
But implementation of function ASN1_INTEGER_get in openssl (in 1.1.1 and 3.0)
have additional error case:
if (r > LONG_MAX || r < LONG_MIN)
return -1;
This error case is reported only by returning -1 value, and can't be detected through ERR_get_error mechanism.
So, in case of a1int containing value, larger/smaller than max/min value which can fit into long type - it will return -1 value, and this -1 value will be propagated as valid value inside of code using getLong() method.
The text was updated successfully, but these errors were encountered:
In this method:
xca/lib/asn1int.cpp
Lines 152 to 157 in 3e858c8
openssl_error handles errors through ERR_get_error.
So openssl should set error inside of method.
But implementation of function ASN1_INTEGER_get in openssl (in 1.1.1 and 3.0)
have additional error case:
This error case is reported only by returning -1 value, and can't be detected through ERR_get_error mechanism.
So, in case of a1int containing value, larger/smaller than max/min value which can fit into long type - it will return -1 value, and this -1 value will be propagated as valid value inside of code using getLong() method.
The text was updated successfully, but these errors were encountered: