diff options
Diffstat (limited to 'src/lib/libcrypto/x509/x509_err.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_err.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/lib/libcrypto/x509/x509_err.c b/src/lib/libcrypto/x509/x509_err.c index 2cbd349350..cff045b105 100644 --- a/src/lib/libcrypto/x509/x509_err.c +++ b/src/lib/libcrypto/x509/x509_err.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_err.c,v 1.22 2023/05/14 17:20:26 tb Exp $ */ | 1 | /* $OpenBSD: x509_err.c,v 1.23 2024/06/24 06:43:23 tb Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -61,17 +61,19 @@ | |||
61 | #include <openssl/x509.h> | 61 | #include <openssl/x509.h> |
62 | #include <openssl/x509v3.h> | 62 | #include <openssl/x509v3.h> |
63 | 63 | ||
64 | #include "err_local.h" | ||
65 | |||
64 | #ifndef OPENSSL_NO_ERR | 66 | #ifndef OPENSSL_NO_ERR |
65 | 67 | ||
66 | #define ERR_FUNC(func) ERR_PACK(ERR_LIB_X509,func,0) | 68 | #define ERR_FUNC(func) ERR_PACK(ERR_LIB_X509,func,0) |
67 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_X509,0,reason) | 69 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_X509,0,reason) |
68 | 70 | ||
69 | static ERR_STRING_DATA X509_str_functs[] = { | 71 | static const ERR_STRING_DATA X509_str_functs[] = { |
70 | {ERR_FUNC(0xfff), "CRYPTO_internal"}, | 72 | {ERR_FUNC(0xfff), "CRYPTO_internal"}, |
71 | {0, NULL} | 73 | {0, NULL} |
72 | }; | 74 | }; |
73 | 75 | ||
74 | static ERR_STRING_DATA X509_str_reasons[] = { | 76 | static const ERR_STRING_DATA X509_str_reasons[] = { |
75 | {ERR_REASON(X509_R_BAD_X509_FILETYPE) , "bad x509 filetype"}, | 77 | {ERR_REASON(X509_R_BAD_X509_FILETYPE) , "bad x509 filetype"}, |
76 | {ERR_REASON(X509_R_BASE64_DECODE_ERROR) , "base64 decode error"}, | 78 | {ERR_REASON(X509_R_BASE64_DECODE_ERROR) , "base64 decode error"}, |
77 | {ERR_REASON(X509_R_CANT_CHECK_DH_KEY) , "cant check dh key"}, | 79 | {ERR_REASON(X509_R_CANT_CHECK_DH_KEY) , "cant check dh key"}, |
@@ -108,12 +110,12 @@ static ERR_STRING_DATA X509_str_reasons[] = { | |||
108 | #define ERR_FUNC(func) ERR_PACK(ERR_LIB_X509V3,func,0) | 110 | #define ERR_FUNC(func) ERR_PACK(ERR_LIB_X509V3,func,0) |
109 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_X509V3,0,reason) | 111 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_X509V3,0,reason) |
110 | 112 | ||
111 | static ERR_STRING_DATA X509V3_str_functs[] = { | 113 | static const ERR_STRING_DATA X509V3_str_functs[] = { |
112 | {ERR_FUNC(0xfff), "CRYPTO_internal"}, | 114 | {ERR_FUNC(0xfff), "CRYPTO_internal"}, |
113 | {0, NULL} | 115 | {0, NULL} |
114 | }; | 116 | }; |
115 | 117 | ||
116 | static ERR_STRING_DATA X509V3_str_reasons[] = { | 118 | static const ERR_STRING_DATA X509V3_str_reasons[] = { |
117 | {ERR_REASON(X509V3_R_BAD_IP_ADDRESS) , "bad ip address"}, | 119 | {ERR_REASON(X509V3_R_BAD_IP_ADDRESS) , "bad ip address"}, |
118 | {ERR_REASON(X509V3_R_BAD_OBJECT) , "bad object"}, | 120 | {ERR_REASON(X509V3_R_BAD_OBJECT) , "bad object"}, |
119 | {ERR_REASON(X509V3_R_BN_DEC2BN_ERROR) , "bn dec2bn error"}, | 121 | {ERR_REASON(X509V3_R_BN_DEC2BN_ERROR) , "bn dec2bn error"}, |
@@ -192,8 +194,8 @@ ERR_load_X509_strings(void) | |||
192 | { | 194 | { |
193 | #ifndef OPENSSL_NO_ERR | 195 | #ifndef OPENSSL_NO_ERR |
194 | if (ERR_func_error_string(X509_str_functs[0].error) == NULL) { | 196 | if (ERR_func_error_string(X509_str_functs[0].error) == NULL) { |
195 | ERR_load_strings(0, X509_str_functs); | 197 | ERR_load_const_strings(X509_str_functs); |
196 | ERR_load_strings(0, X509_str_reasons); | 198 | ERR_load_const_strings(X509_str_reasons); |
197 | } | 199 | } |
198 | #endif | 200 | #endif |
199 | } | 201 | } |
@@ -205,8 +207,8 @@ ERR_load_X509V3_strings(void) | |||
205 | { | 207 | { |
206 | #ifndef OPENSSL_NO_ERR | 208 | #ifndef OPENSSL_NO_ERR |
207 | if (ERR_func_error_string(X509V3_str_functs[0].error) == NULL) { | 209 | if (ERR_func_error_string(X509V3_str_functs[0].error) == NULL) { |
208 | ERR_load_strings(0, X509V3_str_functs); | 210 | ERR_load_const_strings(X509V3_str_functs); |
209 | ERR_load_strings(0, X509V3_str_reasons); | 211 | ERR_load_const_strings(X509V3_str_reasons); |
210 | } | 212 | } |
211 | #endif | 213 | #endif |
212 | } | 214 | } |