diff options
author | Richard Levitte <levitte@openssl.org> | 2020-11-04 12:23:19 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-11-13 09:35:02 +0100 |
commit | 9311d0c471ca2eaa259e8c1bbbeb7c46394c7ba2 (patch) | |
tree | e82c26569e5a952980e65a746af920beed602aab /crypto/x509/x_name.c | |
parent | 31a6b52f6db009c639c67387a707dd235f29a430 (diff) | |
download | openssl-new-9311d0c471ca2eaa259e8c1bbbeb7c46394c7ba2.tar.gz |
Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call
This includes error reporting for libcrypto sub-libraries in surprising
places.
This was done using util/err-to-raise
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13318)
Diffstat (limited to 'crypto/x509/x_name.c')
-rw-r--r-- | crypto/x509/x_name.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/crypto/x509/x_name.c b/crypto/x509/x_name.c index a85b10f1cf..7b59b71ffb 100644 --- a/crypto/x509/x_name.c +++ b/crypto/x509/x_name.c @@ -102,7 +102,7 @@ static int x509_name_ex_new(ASN1_VALUE **val, const ASN1_ITEM *it) return 1; memerr: - ASN1err(ASN1_F_X509_NAME_EX_NEW, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_ASN1, ERR_R_MALLOC_FAILURE); if (ret) { sk_X509_NAME_ENTRY_free(ret->entries); OPENSSL_free(ret); @@ -204,7 +204,7 @@ static int x509_name_ex_d2i(ASN1_VALUE **val, X509_NAME_free(nm.x); sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s, local_sk_X509_NAME_ENTRY_pop_free); - ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR); + ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR); return 0; } @@ -276,7 +276,7 @@ static int x509_name_encode(X509_NAME *a) memerr: sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s, local_sk_X509_NAME_ENTRY_free); - ASN1err(ASN1_F_X509_NAME_ENCODE, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_ASN1, ERR_R_MALLOC_FAILURE); return -1; } @@ -317,7 +317,7 @@ static int x509_name_canon(X509_NAME *a) } intname = sk_STACK_OF_X509_NAME_ENTRY_new_null(); if (intname == NULL) { - X509err(X509_F_X509_NAME_CANON, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_X509, ERR_R_MALLOC_FAILURE); goto err; } for (i = 0; i < sk_X509_NAME_ENTRY_num(a->entries); i++) { @@ -328,25 +328,25 @@ static int x509_name_canon(X509_NAME *a) goto err; if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname, entries)) { sk_X509_NAME_ENTRY_free(entries); - X509err(X509_F_X509_NAME_CANON, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_X509, ERR_R_MALLOC_FAILURE); goto err; } set = entry->set; } tmpentry = X509_NAME_ENTRY_new(); if (tmpentry == NULL) { - X509err(X509_F_X509_NAME_CANON, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_X509, ERR_R_MALLOC_FAILURE); goto err; } tmpentry->object = OBJ_dup(entry->object); if (tmpentry->object == NULL) { - X509err(X509_F_X509_NAME_CANON, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_X509, ERR_R_MALLOC_FAILURE); goto err; } if (!asn1_string_canon(tmpentry->value, entry->value)) goto err; if (!sk_X509_NAME_ENTRY_push(entries, tmpentry)) { - X509err(X509_F_X509_NAME_CANON, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_X509, ERR_R_MALLOC_FAILURE); goto err; } tmpentry = NULL; @@ -360,7 +360,7 @@ static int x509_name_canon(X509_NAME *a) p = OPENSSL_malloc(a->canon_enclen); if (p == NULL) { - X509err(X509_F_X509_NAME_CANON, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_X509, ERR_R_MALLOC_FAILURE); goto err; } @@ -537,7 +537,7 @@ int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase) OPENSSL_free(b); return 1; err: - X509err(X509_F_X509_NAME_PRINT, ERR_R_BUF_LIB); + ERR_raise(ERR_LIB_X509, ERR_R_BUF_LIB); OPENSSL_free(b); return 0; } |