summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dh/dh_err.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/dh/dh_err.c')
-rw-r--r--src/lib/libcrypto/dh/dh_err.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/libcrypto/dh/dh_err.c b/src/lib/libcrypto/dh/dh_err.c
index 52fec7848b..568eff5752 100644
--- a/src/lib/libcrypto/dh/dh_err.c
+++ b/src/lib/libcrypto/dh/dh_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh_err.c,v 1.21 2024/05/19 08:22:40 tb Exp $ */ 1/* $OpenBSD: dh_err.c,v 1.22 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 *
@@ -57,20 +57,22 @@
57 57
58#include <openssl/opensslconf.h> 58#include <openssl/opensslconf.h>
59 59
60#include <openssl/err.h>
61#include <openssl/dh.h> 60#include <openssl/dh.h>
61#include <openssl/err.h>
62
63#include "err_local.h"
62 64
63#ifndef OPENSSL_NO_ERR 65#ifndef OPENSSL_NO_ERR
64 66
65#define ERR_FUNC(func) ERR_PACK(ERR_LIB_DH,func,0) 67#define ERR_FUNC(func) ERR_PACK(ERR_LIB_DH,func,0)
66#define ERR_REASON(reason) ERR_PACK(ERR_LIB_DH,0,reason) 68#define ERR_REASON(reason) ERR_PACK(ERR_LIB_DH,0,reason)
67 69
68static ERR_STRING_DATA DH_str_functs[] = { 70static const ERR_STRING_DATA DH_str_functs[] = {
69 {ERR_FUNC(0xfff), "CRYPTO_internal"}, 71 {ERR_FUNC(0xfff), "CRYPTO_internal"},
70 {0, NULL} 72 {0, NULL}
71}; 73};
72 74
73static ERR_STRING_DATA DH_str_reasons[] = { 75static const ERR_STRING_DATA DH_str_reasons[] = {
74 {ERR_REASON(DH_R_BAD_GENERATOR) ,"bad generator"}, 76 {ERR_REASON(DH_R_BAD_GENERATOR) ,"bad generator"},
75 {ERR_REASON(DH_R_BN_DECODE_ERROR) ,"bn decode error"}, 77 {ERR_REASON(DH_R_BN_DECODE_ERROR) ,"bn decode error"},
76 {ERR_REASON(DH_R_BN_ERROR) ,"bn error"}, 78 {ERR_REASON(DH_R_BN_ERROR) ,"bn error"},
@@ -104,8 +106,8 @@ ERR_load_DH_strings(void)
104{ 106{
105#ifndef OPENSSL_NO_ERR 107#ifndef OPENSSL_NO_ERR
106 if (ERR_func_error_string(DH_str_functs[0].error) == NULL) { 108 if (ERR_func_error_string(DH_str_functs[0].error) == NULL) {
107 ERR_load_strings(0, DH_str_functs); 109 ERR_load_const_strings(DH_str_functs);
108 ERR_load_strings(0, DH_str_reasons); 110 ERR_load_const_strings(DH_str_reasons);
109 } 111 }
110#endif 112#endif
111} 113}