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/v3_sxnet.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/v3_sxnet.c')
-rw-r--r-- | crypto/x509/v3_sxnet.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/crypto/x509/v3_sxnet.c b/crypto/x509/v3_sxnet.c index b7623b1051..76f5eafc73 100644 --- a/crypto/x509/v3_sxnet.c +++ b/crypto/x509/v3_sxnet.c @@ -106,7 +106,7 @@ int SXNET_add_id_asc(SXNET **psx, const char *zone, const char *user, int userle ASN1_INTEGER *izone; if ((izone = s2i_ASN1_INTEGER(NULL, zone)) == NULL) { - X509V3err(X509V3_F_SXNET_ADD_ID_ASC, X509V3_R_ERROR_CONVERTING_ZONE); + ERR_raise(ERR_LIB_X509V3, X509V3_R_ERROR_CONVERTING_ZONE); return 0; } return SXNET_add_id_INTEGER(psx, izone, user, userlen); @@ -121,7 +121,7 @@ int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, const char *user, if ((izone = ASN1_INTEGER_new()) == NULL || !ASN1_INTEGER_set(izone, lzone)) { - X509V3err(X509V3_F_SXNET_ADD_ID_ULONG, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_X509V3, ERR_R_MALLOC_FAILURE); ASN1_INTEGER_free(izone); return 0; } @@ -141,14 +141,13 @@ int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *zone, const char *user, SXNETID *id = NULL; if (psx == NULL || zone == NULL || user == NULL) { - X509V3err(X509V3_F_SXNET_ADD_ID_INTEGER, - X509V3_R_INVALID_NULL_ARGUMENT); + ERR_raise(ERR_LIB_X509V3, X509V3_R_INVALID_NULL_ARGUMENT); return 0; } if (userlen == -1) userlen = strlen(user); if (userlen > 64) { - X509V3err(X509V3_F_SXNET_ADD_ID_INTEGER, X509V3_R_USER_TOO_LONG); + ERR_raise(ERR_LIB_X509V3, X509V3_R_USER_TOO_LONG); return 0; } if (*psx == NULL) { @@ -160,7 +159,7 @@ int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *zone, const char *user, } else sx = *psx; if (SXNET_get_id_INTEGER(sx, zone)) { - X509V3err(X509V3_F_SXNET_ADD_ID_INTEGER, X509V3_R_DUPLICATE_ZONE_ID); + ERR_raise(ERR_LIB_X509V3, X509V3_R_DUPLICATE_ZONE_ID); return 0; } @@ -177,7 +176,7 @@ int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *zone, const char *user, return 1; err: - X509V3err(X509V3_F_SXNET_ADD_ID_INTEGER, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_X509V3, ERR_R_MALLOC_FAILURE); SXNETID_free(id); SXNET_free(sx); *psx = NULL; @@ -190,7 +189,7 @@ ASN1_OCTET_STRING *SXNET_get_id_asc(SXNET *sx, const char *zone) ASN1_OCTET_STRING *oct; if ((izone = s2i_ASN1_INTEGER(NULL, zone)) == NULL) { - X509V3err(X509V3_F_SXNET_GET_ID_ASC, X509V3_R_ERROR_CONVERTING_ZONE); + ERR_raise(ERR_LIB_X509V3, X509V3_R_ERROR_CONVERTING_ZONE); return NULL; } oct = SXNET_get_id_INTEGER(sx, izone); @@ -205,7 +204,7 @@ ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone) if ((izone = ASN1_INTEGER_new()) == NULL || !ASN1_INTEGER_set(izone, lzone)) { - X509V3err(X509V3_F_SXNET_GET_ID_ULONG, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_X509V3, ERR_R_MALLOC_FAILURE); ASN1_INTEGER_free(izone); return NULL; } |