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/evp/pmeth_check.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/evp/pmeth_check.c')
-rw-r--r-- | crypto/evp/pmeth_check.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/crypto/evp/pmeth_check.c b/crypto/evp/pmeth_check.c index 449ff88095..c9a5a7bc65 100644 --- a/crypto/evp/pmeth_check.c +++ b/crypto/evp/pmeth_check.c @@ -48,7 +48,7 @@ int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx) int ok; if (pkey == NULL) { - EVPerr(EVP_F_EVP_PKEY_PUBLIC_CHECK, EVP_R_NO_KEY_SET); + ERR_raise(ERR_LIB_EVP, EVP_R_NO_KEY_SET); return 0; } @@ -71,7 +71,7 @@ int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx) return pkey->ameth->pkey_public_check(pkey); #endif not_supported: - EVPerr(0, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); + ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); return -2; } @@ -81,7 +81,7 @@ int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx) int ok; if (pkey == NULL) { - EVPerr(EVP_F_EVP_PKEY_PARAM_CHECK, EVP_R_NO_KEY_SET); + ERR_raise(ERR_LIB_EVP, EVP_R_NO_KEY_SET); return 0; } @@ -105,7 +105,7 @@ int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx) return pkey->ameth->pkey_param_check(pkey); #endif not_supported: - EVPerr(0, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); + ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); return -2; } @@ -115,7 +115,7 @@ int EVP_PKEY_private_check(EVP_PKEY_CTX *ctx) int ok; if (pkey == NULL) { - EVPerr(0, EVP_R_NO_KEY_SET); + ERR_raise(ERR_LIB_EVP, EVP_R_NO_KEY_SET); return 0; } @@ -123,7 +123,7 @@ int EVP_PKEY_private_check(EVP_PKEY_CTX *ctx) return ok; /* not supported for legacy keys */ - EVPerr(0, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); + ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); return -2; } @@ -133,7 +133,7 @@ int EVP_PKEY_pairwise_check(EVP_PKEY_CTX *ctx) int ok; if (pkey == NULL) { - EVPerr(0, EVP_R_NO_KEY_SET); + ERR_raise(ERR_LIB_EVP, EVP_R_NO_KEY_SET); return 0; } @@ -141,7 +141,7 @@ int EVP_PKEY_pairwise_check(EVP_PKEY_CTX *ctx) return ok; /* not supported for legacy keys */ - EVPerr(0, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); + ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); return -2; } @@ -151,7 +151,7 @@ int EVP_PKEY_check(EVP_PKEY_CTX *ctx) int ok; if (pkey == NULL) { - EVPerr(EVP_F_EVP_PKEY_CHECK, EVP_R_NO_KEY_SET); + ERR_raise(ERR_LIB_EVP, EVP_R_NO_KEY_SET); return 0; } @@ -174,7 +174,7 @@ int EVP_PKEY_check(EVP_PKEY_CTX *ctx) return pkey->ameth->pkey_check(pkey); #endif not_supported: - EVPerr(0, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); + ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); return -2; } |