summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/cpt_err.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/cpt_err.c')
-rw-r--r--src/lib/libcrypto/cpt_err.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/libcrypto/cpt_err.c b/src/lib/libcrypto/cpt_err.c
index ff4e5c4bc5..459b99d433 100644
--- a/src/lib/libcrypto/cpt_err.c
+++ b/src/lib/libcrypto/cpt_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cpt_err.c,v 1.15 2023/07/08 08:28:23 beck Exp $ */ 1/* $OpenBSD: cpt_err.c,v 1.16 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,12 +60,14 @@
60#include <openssl/err.h> 60#include <openssl/err.h>
61#include <openssl/crypto.h> 61#include <openssl/crypto.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_CRYPTO,func,0) 67#define ERR_FUNC(func) ERR_PACK(ERR_LIB_CRYPTO,func,0)
66#define ERR_REASON(reason) ERR_PACK(ERR_LIB_CRYPTO,0,reason) 68#define ERR_REASON(reason) ERR_PACK(ERR_LIB_CRYPTO,0,reason)
67 69
68static ERR_STRING_DATA CRYPTO_str_functs[] = { 70static const ERR_STRING_DATA CRYPTO_str_functs[] = {
69 {ERR_FUNC(CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX), "CRYPTO_get_ex_new_index"}, 71 {ERR_FUNC(CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX), "CRYPTO_get_ex_new_index"},
70 {ERR_FUNC(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID), "CRYPTO_get_new_dynlockid"}, 72 {ERR_FUNC(CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID), "CRYPTO_get_new_dynlockid"},
71 {ERR_FUNC(CRYPTO_F_CRYPTO_GET_NEW_LOCKID), "CRYPTO_get_new_lockid"}, 73 {ERR_FUNC(CRYPTO_F_CRYPTO_GET_NEW_LOCKID), "CRYPTO_get_new_lockid"},
@@ -79,7 +81,7 @@ static ERR_STRING_DATA CRYPTO_str_functs[] = {
79 {0, NULL} 81 {0, NULL}
80}; 82};
81 83
82static ERR_STRING_DATA CRYPTO_str_reasons[] = { 84static const ERR_STRING_DATA CRYPTO_str_reasons[] = {
83 {ERR_REASON(CRYPTO_R_FIPS_MODE_NOT_SUPPORTED), "fips mode not supported"}, 85 {ERR_REASON(CRYPTO_R_FIPS_MODE_NOT_SUPPORTED), "fips mode not supported"},
84 {ERR_REASON(CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK), "no dynlock create callback"}, 86 {ERR_REASON(CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK), "no dynlock create callback"},
85 {0, NULL} 87 {0, NULL}
@@ -92,8 +94,8 @@ ERR_load_CRYPTO_strings(void)
92{ 94{
93#ifndef OPENSSL_NO_ERR 95#ifndef OPENSSL_NO_ERR
94 if (ERR_func_error_string(CRYPTO_str_functs[0].error) == NULL) { 96 if (ERR_func_error_string(CRYPTO_str_functs[0].error) == NULL) {
95 ERR_load_strings(0, CRYPTO_str_functs); 97 ERR_load_const_strings(CRYPTO_str_functs);
96 ERR_load_strings(0, CRYPTO_str_reasons); 98 ERR_load_const_strings(CRYPTO_str_reasons);
97 } 99 }
98#endif 100#endif
99} 101}