From: job Date: Mon, 24 Apr 2023 08:39:06 +0000 (+0000) Subject: Sort X.509 error reasons, use next available error value, and align X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=70a14bb9b46f7b8242587f783584a0a5cc81a48a;p=openbsd Sort X.509 error reasons, use next available error value, and align error message with internal error code name. OK tb@ jsing@ --- diff --git a/lib/libcrypto/x509/x509.h b/lib/libcrypto/x509/x509.h index e8cedaae13e..ece90288801 100644 --- a/lib/libcrypto/x509/x509.h +++ b/lib/libcrypto/x509/x509.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.h,v 1.97 2023/04/23 21:31:16 job Exp $ */ +/* $OpenBSD: x509.h,v 1.98 2023/04/24 08:39:06 job Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1181,6 +1181,7 @@ void ERR_load_X509_strings(void); #define X509_R_INVALID_DIRECTORY 113 #define X509_R_INVALID_FIELD_NAME 119 #define X509_R_INVALID_TRUST 123 +#define X509_R_INVALID_VERSION 137 #define X509_R_KEY_TYPE_MISMATCH 115 #define X509_R_KEY_VALUES_MISMATCH 116 #define X509_R_LOADING_CERT_DIR 103 @@ -1200,7 +1201,6 @@ void ERR_load_X509_strings(void); #define X509_R_UNSUPPORTED_ALGORITHM 111 #define X509_R_WRONG_LOOKUP_TYPE 112 #define X509_R_WRONG_TYPE 122 -#define X509_R_INVALID_VERSION 123 #ifdef __cplusplus } diff --git a/lib/libcrypto/x509/x509_err.c b/lib/libcrypto/x509/x509_err.c index 84328df62a2..bcb04f1fd88 100644 --- a/lib/libcrypto/x509/x509_err.c +++ b/lib/libcrypto/x509/x509_err.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_err.c,v 1.20 2023/04/23 21:31:16 job Exp $ */ +/* $OpenBSD: x509_err.c,v 1.21 2023/04/24 08:39:06 job Exp $ */ /* ==================================================================== * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. * @@ -85,6 +85,7 @@ static ERR_STRING_DATA X509_str_reasons[] = { {ERR_REASON(X509_R_INVALID_DIRECTORY) , "invalid directory"}, {ERR_REASON(X509_R_INVALID_FIELD_NAME) , "invalid field name"}, {ERR_REASON(X509_R_INVALID_TRUST) , "invalid trust"}, + {ERR_REASON(X509_R_INVALID_VERSION) , "invalid x509 version"}, {ERR_REASON(X509_R_KEY_TYPE_MISMATCH) , "key type mismatch"}, {ERR_REASON(X509_R_KEY_VALUES_MISMATCH) , "key values mismatch"}, {ERR_REASON(X509_R_LOADING_CERT_DIR) , "loading cert dir"}, @@ -104,7 +105,6 @@ static ERR_STRING_DATA X509_str_reasons[] = { {ERR_REASON(X509_R_UNSUPPORTED_ALGORITHM), "unsupported algorithm"}, {ERR_REASON(X509_R_WRONG_LOOKUP_TYPE) , "wrong lookup type"}, {ERR_REASON(X509_R_WRONG_TYPE) , "wrong type"}, - {ERR_REASON(X509_R_INVALID_VERSION) , "wrong x509 version"}, {0, NULL} };