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/cmp/cmp_status.c | |
parent | 31a6b52f6db009c639c67387a707dd235f29a430 (diff) |
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/cmp/cmp_status.c')
-rw-r--r-- | crypto/cmp/cmp_status.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/cmp/cmp_status.c b/crypto/cmp/cmp_status.c index c9809c5a3a..1660906753 100644 --- a/crypto/cmp/cmp_status.c +++ b/crypto/cmp/cmp_status.c @@ -56,7 +56,7 @@ const char *ossl_cmp_PKIStatus_to_string(int status) { char buf[40]; BIO_snprintf(buf, sizeof(buf), "PKIStatus: invalid=%d", status); - CMPerr(0, CMP_R_ERROR_PARSING_PKISTATUS); + ERR_raise(ERR_LIB_CMP, CMP_R_ERROR_PARSING_PKISTATUS); ERR_add_error_data(1, buf); return NULL; } @@ -154,7 +154,7 @@ int ossl_cmp_pkisi_check_pkifailureinfo(const OSSL_CMP_PKISI *si, int bit_index) if (!ossl_assert(si != NULL && si->failInfo != NULL)) return -1; if (bit_index < 0 || bit_index > OSSL_CMP_PKIFAILUREINFO_MAX) { - CMPerr(0, CMP_R_INVALID_ARGS); + ERR_raise(ERR_LIB_CMP, CMP_R_INVALID_ARGS); return -1; } @@ -240,7 +240,7 @@ char *OSSL_CMP_snprint_PKIStatusInfo(const OSSL_CMP_PKISI *statusInfo, int failure_info; if (statusInfo == NULL) { - CMPerr(0, CMP_R_NULL_ARGUMENT); + ERR_raise(ERR_LIB_CMP, CMP_R_NULL_ARGUMENT); return NULL; } @@ -255,7 +255,7 @@ char *OSSL_CMP_CTX_snprint_PKIStatus(const OSSL_CMP_CTX *ctx, char *buf, size_t bufsize) { if (ctx == NULL) { - CMPerr(0, CMP_R_NULL_ARGUMENT); + ERR_raise(ERR_LIB_CMP, CMP_R_NULL_ARGUMENT); return NULL; } |