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:
Dr. Stephen Henson
2001-01-04 19:53:48 +00:00
parent bf0d176e48
commit a8312c0e24
5 changed files with 12 additions and 6 deletions

View File

@@ -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++)
{