diff options
author | Richard Levitte <levitte@openssl.org> | 2021-11-22 17:08:19 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-11-24 19:18:19 +0100 |
commit | 8585b5bc62d0bf394ca6adf24f8590e9b9b18402 (patch) | |
tree | 0f19c6184648cbb605ec8b419b2723db46b0f542 /crypto/cpt_err.c | |
parent | b556713a6f2884eadc7f56428bc82a844e9a49e0 (diff) |
Have OSSL_PARAM_allocate_from_text() raise error on unexpected neg number
When the parameter definition has the data type OSSL_PARAM_UNSIGNED_INTEGER,
negative input values should not be accepted.
Fixes #17103
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17104)
Diffstat (limited to 'crypto/cpt_err.c')
-rw-r--r-- | crypto/cpt_err.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/cpt_err.c b/crypto/cpt_err.c index 79c1a90595..8574f31a81 100644 --- a/crypto/cpt_err.c +++ b/crypto/cpt_err.c @@ -29,6 +29,8 @@ static const ERR_STRING_DATA CRYPTO_str_reasons[] = { "insufficient param size"}, {ERR_PACK(ERR_LIB_CRYPTO, 0, CRYPTO_R_INSUFFICIENT_SECURE_DATA_SPACE), "insufficient secure data space"}, + {ERR_PACK(ERR_LIB_CRYPTO, 0, CRYPTO_R_INVALID_NEGATIVE_VALUE), + "invalid negative value"}, {ERR_PACK(ERR_LIB_CRYPTO, 0, CRYPTO_R_INVALID_NULL_ARGUMENT), "invalid null argument"}, {ERR_PACK(ERR_LIB_CRYPTO, 0, CRYPTO_R_INVALID_OSSL_PARAM_TYPE), |