diff options
Diffstat (limited to 'src/lib/libcrypto/asn1')
| -rw-r--r-- | src/lib/libcrypto/asn1/asn1_err.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/asn1_err.c b/src/lib/libcrypto/asn1/asn1_err.c index 28570386f6..44809c76b1 100644 --- a/src/lib/libcrypto/asn1/asn1_err.c +++ b/src/lib/libcrypto/asn1/asn1_err.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: asn1_err.c,v 1.26 2023/07/05 21:23:36 beck Exp $ */ | 1 | /* $OpenBSD: asn1_err.c,v 1.27 2024/06/24 06:43:22 tb Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -60,17 +60,19 @@ | |||
| 60 | #include <openssl/err.h> | 60 | #include <openssl/err.h> |
| 61 | #include <openssl/asn1.h> | 61 | #include <openssl/asn1.h> |
| 62 | 62 | ||
| 63 | #include "err_local.h" | ||
| 64 | |||
| 63 | #ifndef OPENSSL_NO_ERR | 65 | #ifndef OPENSSL_NO_ERR |
| 64 | 66 | ||
| 65 | #define ERR_FUNC(func) ERR_PACK(ERR_LIB_ASN1,func,0) | 67 | #define ERR_FUNC(func) ERR_PACK(ERR_LIB_ASN1,func,0) |
| 66 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_ASN1,0,reason) | 68 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_ASN1,0,reason) |
| 67 | 69 | ||
| 68 | static ERR_STRING_DATA ASN1_str_functs[] = { | 70 | static const ERR_STRING_DATA ASN1_str_functs[] = { |
| 69 | {ERR_FUNC(0xfff), "CRYPTO_internal"}, | 71 | {ERR_FUNC(0xfff), "CRYPTO_internal"}, |
| 70 | {0, NULL} | 72 | {0, NULL} |
| 71 | }; | 73 | }; |
| 72 | 74 | ||
| 73 | static ERR_STRING_DATA ASN1_str_reasons[] = { | 75 | static const ERR_STRING_DATA ASN1_str_reasons[] = { |
| 74 | {ERR_REASON(ASN1_R_ADDING_OBJECT) , "adding object"}, | 76 | {ERR_REASON(ASN1_R_ADDING_OBJECT) , "adding object"}, |
| 75 | {ERR_REASON(ASN1_R_ASN1_PARSE_ERROR) , "asn1 parse error"}, | 77 | {ERR_REASON(ASN1_R_ASN1_PARSE_ERROR) , "asn1 parse error"}, |
| 76 | {ERR_REASON(ASN1_R_ASN1_SIG_PARSE_ERROR) , "asn1 sig parse error"}, | 78 | {ERR_REASON(ASN1_R_ASN1_SIG_PARSE_ERROR) , "asn1 sig parse error"}, |
| @@ -206,8 +208,8 @@ ERR_load_ASN1_strings(void) | |||
| 206 | { | 208 | { |
| 207 | #ifndef OPENSSL_NO_ERR | 209 | #ifndef OPENSSL_NO_ERR |
| 208 | if (ERR_func_error_string(ASN1_str_functs[0].error) == NULL) { | 210 | if (ERR_func_error_string(ASN1_str_functs[0].error) == NULL) { |
| 209 | ERR_load_strings(0, ASN1_str_functs); | 211 | ERR_load_const_strings(ASN1_str_functs); |
| 210 | ERR_load_strings(0, ASN1_str_reasons); | 212 | ERR_load_const_strings(ASN1_str_reasons); |
| 211 | } | 213 | } |
| 212 | #endif | 214 | #endif |
| 213 | } | 215 | } |
