diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2001-01-04 19:53:48 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2001-01-04 19:53:48 +0000 |
commit | a8312c0e24a73e70b25d9811de2106f50b32081b (patch) | |
tree | 9bcba6edf3346e4401ebedebacc1429c14a32e6a /crypto/asn1/a_enum.c | |
parent | bf0d176e48c6dd44c6cb3250d1e56d9d098f815a (diff) |
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().
Diffstat (limited to 'crypto/asn1/a_enum.c')
-rw-r--r-- | crypto/asn1/a_enum.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/a_enum.c b/crypto/asn1/a_enum.c index b507c5ee44..8a315fa371 100644 --- a/crypto/asn1/a_enum.c +++ b/crypto/asn1/a_enum.c @@ -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++) { |