summaryrefslogtreecommitdiffstats
path: root/crypto/err
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-10-17 07:07:41 +0200
committerRichard Levitte <levitte@openssl.org>2021-01-12 19:02:11 +0100
commitd6d42cda5fbc05aeaadf8c760db60e9089e3609b (patch)
tree273838dfcbed4ddcd97b287a8db2187508536e13 /crypto/err
parent0d11846e4b2850773d1ee0df206608549a7d45d0 (diff)
Use centralized fetching errors
We've spread around FETCH_FAILED errors in quite a few places, and that gives somewhat crude error records, as there's no way to tell if the error was unavailable algorithms or some other error at such high levels. As an alternative, we take recording of these kinds of errors down to the fetching functions, which are in a much better place to tell what kind of error it was, thereby relieving the higher level calls from having to guess. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13467)
Diffstat (limited to 'crypto/err')
-rw-r--r--crypto/err/err.c9
-rw-r--r--crypto/err/openssl.txt1
2 files changed, 9 insertions, 1 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c
index 9528158a08..bc7ce875d0 100644
--- a/crypto/err/err.c
+++ b/crypto/err/err.c
@@ -117,6 +117,15 @@ static ERR_STRING_DATA ERR_str_reasons[] = {
{ERR_R_INVALID_PROVIDER_FUNCTIONS, "invalid provider functions"},
{ERR_R_INTERRUPTED_OR_CANCELLED, "interrupted or cancelled"},
+ /*
+ * Something is unsupported, exactly what is expressed with additional data
+ */
+ {ERR_R_UNSUPPORTED, "unsupported"},
+ /*
+ * A fetch failed for other reasons than the name to be fetched being
+ * unsupported.
+ */
+ {ERR_R_FETCH_FAILED, "fetch failed"},
{0, NULL},
};
#endif
diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt
index 4e36fc3394..b67d2e266d 100644
--- a/crypto/err/openssl.txt
+++ b/crypto/err/openssl.txt
@@ -2554,7 +2554,6 @@ EVP_R_EXPECTING_A_ECX_KEY:219:expecting a ecx key
EVP_R_EXPECTING_A_EC_KEY:142:expecting a ec key
EVP_R_EXPECTING_A_POLY1305_KEY:164:expecting a poly1305 key
EVP_R_EXPECTING_A_SIPHASH_KEY:175:expecting a siphash key
-EVP_R_FETCH_FAILED:202:fetch failed
EVP_R_FINAL_ERROR:188:final error
EVP_R_FIPS_MODE_NOT_SUPPORTED:167:fips mode not supported
EVP_R_GENERATE_ERROR:214:generate error