Fix typo in OCSP nonce extension.
Set correct type in ASN1_STRING for INTEGER and ENUMERATED types. Make ASN1_INTEGER_get() and ASN1_ENUMERATED_get() return -1 for invalid type rather than 0 (which is often valid). -1 may also be valid but this is less likely. Load OCSP error strings in ERR_load_crypto_strings().
This commit is contained in:
@@ -114,7 +114,7 @@ long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a)
|
||||
if (i == V_ASN1_NEG_ENUMERATED)
|
||||
neg=1;
|
||||
else if (i != V_ASN1_ENUMERATED)
|
||||
return(0);
|
||||
return -1;
|
||||
|
||||
if (a->length > sizeof(long))
|
||||
{
|
||||
@@ -122,7 +122,7 @@ long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a)
|
||||
return(0xffffffffL);
|
||||
}
|
||||
if (a->data == NULL)
|
||||
return(0);
|
||||
return 0;
|
||||
|
||||
for (i=0; i<a->length; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user