[openssl] master update
dev at ddvo.net
dev at ddvo.net
Mon Nov 22 13:38:55 UTC 2021
The branch master has been updated
via e7313323cc420e8dca2526578ae8a4a4d4d390be (commit)
via 3ae55288387a3ff9cf9b1cba2da22bd1aafbc66e (commit)
from 9350aaa41db8fcb0b55dadbd5fbe807ef5288557 (commit)
- Log -----------------------------------------------------------------
commit e7313323cc420e8dca2526578ae8a4a4d4d390be
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date: Fri Nov 19 11:12:09 2021 +0100
02-test_errstr.t: print errorcodes in hex (rather than decimal) format
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17056)
commit 3ae55288387a3ff9cf9b1cba2da22bd1aafbc66e
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date: Wed Nov 17 19:05:21 2021 +0100
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 at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17056)
-----------------------------------------------------------------------
Summary of changes:
crypto/err/err.c | 16 ++++++++++------
test/recipes/02-test_errstr.t | 2 +-
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/crypto/err/err.c b/crypto/err/err.c
index 0f584fdf80..59ca4114db 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"},
diff --git a/test/recipes/02-test_errstr.t b/test/recipes/02-test_errstr.t
index 9427601292..396d273176 100644
--- a/test/recipes/02-test_errstr.t
+++ b/test/recipes/02-test_errstr.t
@@ -139,7 +139,7 @@ sub match_opensslerr_reason {
$reason =~ s|\R$||;
$reason = ( split_error($reason) )[3];
- return match_any($reason, $errcode, @strings);
+ return match_any($reason, $errcode_hex, @strings);
}
sub match_syserr_reason {
More information about the openssl-commits
mailing list