summaryrefslogtreecommitdiffstats
path: root/crypto/err
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-11-17 19:05:21 +0100
committerDr. David von Oheimb <dev@ddvo.net>2021-11-22 14:40:25 +0100
commit2f03ee20093b2fb3526289e9453f58627453c744 (patch)
tree391fa9ad98ddb074b532cce2c2ee3c10b6f1dfa6 /crypto/err
parentf4664e5d40f8736d301763b3e98d2ab0061e3a02 (diff)
Make ERR_str_reasons in err.c consistent again with err.h
Fixes printing generic reason strings, e.g., 'reason(524550)' vs. 'passed an invalid argument' Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17056)
Diffstat (limited to 'crypto/err')
-rw-r--r--crypto/err/err.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c
index 60a9b02d19..c605c21f01 100644
--- a/crypto/err/err.c
+++ b/crypto/err/err.c
@@ -80,6 +80,10 @@ static ERR_STRING_DATA ERR_str_libraries[] = {
{0, NULL},
};
+/*
+ * Should make sure that all ERR_R_ reasons defined in include/openssl/err.h.in
+ * are listed. For maintainability, please keep all reasons in the same order.
+ */
static ERR_STRING_DATA ERR_str_reasons[] = {
{ERR_R_SYS_LIB, "system lib"},
{ERR_R_BN_LIB, "BN lib"},
@@ -92,17 +96,16 @@ static ERR_STRING_DATA ERR_str_reasons[] = {
{ERR_R_DSA_LIB, "DSA lib"},
{ERR_R_X509_LIB, "X509 lib"},
{ERR_R_ASN1_LIB, "ASN1 lib"},
+ {ERR_R_CRYPTO_LIB, "CRYPTO lib"},
{ERR_R_EC_LIB, "EC lib"},
{ERR_R_BIO_LIB, "BIO lib"},
{ERR_R_PKCS7_LIB, "PKCS7 lib"},
{ERR_R_X509V3_LIB, "X509V3 lib"},
{ERR_R_ENGINE_LIB, "ENGINE lib"},
{ERR_R_UI_LIB, "UI lib"},
- {ERR_R_OSSL_STORE_LIB, "STORE lib"},
{ERR_R_ECDSA_LIB, "ECDSA lib"},
-
- {ERR_R_NESTED_ASN1_ERROR, "nested asn1 error"},
- {ERR_R_MISSING_ASN1_EOS, "missing asn1 eos"},
+ {ERR_R_OSSL_STORE_LIB, "OSSL_STORE lib"},
+ {ERR_R_OSSL_DECODER_LIB, "OSSL_DECODER lib"},
{ERR_R_FATAL, "fatal"},
{ERR_R_MALLOC_FAILURE, "malloc failure"},
@@ -112,10 +115,12 @@ static ERR_STRING_DATA ERR_str_reasons[] = {
{ERR_R_INTERNAL_ERROR, "internal error"},
{ERR_R_DISABLED, "called a function that was disabled at compile-time"},
{ERR_R_INIT_FAIL, "init fail"},
+ {ERR_R_PASSED_INVALID_ARGUMENT, "passed invalid argument"},
{ERR_R_OPERATION_FAIL, "operation fail"},
{ERR_R_INVALID_PROVIDER_FUNCTIONS, "invalid provider functions"},
{ERR_R_INTERRUPTED_OR_CANCELLED, "interrupted or cancelled"},
-
+ {ERR_R_NESTED_ASN1_ERROR, "nested asn1 error"},
+ {ERR_R_MISSING_ASN1_EOS, "missing asn1 eos"},
/*
* Something is unsupported, exactly what is expressed with additional data
*/
@@ -125,7 +130,6 @@ static ERR_STRING_DATA ERR_str_reasons[] = {
* unsupported.
*/
{ERR_R_FETCH_FAILED, "fetch failed"},
-
{ERR_R_INVALID_PROPERTY_DEFINITION, "invalid property definition"},
{ERR_R_UNABLE_TO_GET_READ_LOCK, "unable to get read lock"},
{ERR_R_UNABLE_TO_GET_WRITE_LOCK, "unable to get write lock"},