From 9311d0c471ca2eaa259e8c1bbbeb7c46394c7ba2 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 4 Nov 2020 12:23:19 +0100 Subject: 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 (Merged from https://github.com/openssl/openssl/pull/13318) --- crypto/params_from_text.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crypto/params_from_text.c') diff --git a/crypto/params_from_text.c b/crypto/params_from_text.c index 14b64edb6b..9f74dc1075 100644 --- a/crypto/params_from_text.c +++ b/crypto/params_from_text.c @@ -75,7 +75,7 @@ static int prepare_from_text(const OSSL_PARAM *paramdefs, const char *key, */ if (p->data_size > 0) { if (*buf_n >= p->data_size) { - CRYPTOerr(0, CRYPTO_R_TOO_SMALL_BUFFER); + ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_SMALL_BUFFER); /* Since this is a different error, we don't break */ return 0; } @@ -85,7 +85,7 @@ static int prepare_from_text(const OSSL_PARAM *paramdefs, const char *key, break; case OSSL_PARAM_UTF8_STRING: if (*ishex) { - CRYPTOerr(0, ERR_R_PASSED_INVALID_ARGUMENT); + ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT); return 0; } *buf_n = strlen(value) + 1; @@ -182,7 +182,7 @@ int OSSL_PARAM_allocate_from_text(OSSL_PARAM *to, return 0; if ((buf = OPENSSL_zalloc(buf_n > 0 ? buf_n : 1)) == NULL) { - CRYPTOerr(0, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE); return 0; } -- cgit v1.2.3