summaryrefslogtreecommitdiffstats
path: root/crypto/params_from_text.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-11-04 12:23:19 +0100
committerRichard Levitte <levitte@openssl.org>2020-11-13 09:35:02 +0100
commit9311d0c471ca2eaa259e8c1bbbeb7c46394c7ba2 (patch)
treee82c26569e5a952980e65a746af920beed602aab /crypto/params_from_text.c
parent31a6b52f6db009c639c67387a707dd235f29a430 (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/params_from_text.c')
-rw-r--r--crypto/params_from_text.c6
1 files changed, 3 insertions, 3 deletions
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;
}