1 /*
2 * Generated by util/mkerr.pl DO NOT EDIT
3 * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
4 *
5 * Licensed under the Apache License 2.0 (the "License"). You may not use
6 * this file except in compliance with the License. You can obtain a copy
7 * in the file LICENSE in the source distribution or at
8 * https://www.openssl.org/source/license.html
9 */
10
11 #include <openssl/err.h>
12 #include <openssl/dherr.h>
13 #include "crypto/dherr.h"
14
15 #ifndef OPENSSL_NO_DH
16
17 #ifndef OPENSSL_NO_ERR
18
19 static const ERR_STRING_DATA DH_str_reasons[] = {
20 { ERR_PACK(ERR_LIB_DH, 0, DH_R_BAD_FFC_PARAMETERS), "bad ffc parameters" },
21 { ERR_PACK(ERR_LIB_DH, 0, DH_R_BAD_GENERATOR), "bad generator" },
22 { ERR_PACK(ERR_LIB_DH, 0, DH_R_BN_DECODE_ERROR), "bn decode error" },
23 { ERR_PACK(ERR_LIB_DH, 0, DH_R_BN_ERROR), "bn error" },
24 { ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_INVALID_J_VALUE),
25 "check invalid j value" },
26 { ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_INVALID_Q_VALUE),
27 "check invalid q value" },
28 { ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_PUBKEY_INVALID),
29 "check pubkey invalid" },
30 { ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_PUBKEY_TOO_LARGE),
31 "check pubkey too large" },
32 { ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_PUBKEY_TOO_SMALL),
33 "check pubkey too small" },
34 { ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_P_NOT_PRIME), "check p not prime" },
35 { ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_P_NOT_SAFE_PRIME),
36 "check p not safe prime" },
37 { ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_Q_NOT_PRIME), "check q not prime" },
38 { ERR_PACK(ERR_LIB_DH, 0, DH_R_DECODE_ERROR), "decode error" },
39 { ERR_PACK(ERR_LIB_DH, 0, DH_R_INVALID_PARAMETER_NAME),
40 "invalid parameter name" },
41 { ERR_PACK(ERR_LIB_DH, 0, DH_R_INVALID_PARAMETER_NID),
42 "invalid parameter nid" },
43 { ERR_PACK(ERR_LIB_DH, 0, DH_R_INVALID_PUBKEY), "invalid public key" },
44 { ERR_PACK(ERR_LIB_DH, 0, DH_R_INVALID_SECRET), "invalid secret" },
45 { ERR_PACK(ERR_LIB_DH, 0, DH_R_INVALID_SIZE), "invalid size" },
46 { ERR_PACK(ERR_LIB_DH, 0, DH_R_KDF_PARAMETER_ERROR), "kdf parameter error" },
47 { ERR_PACK(ERR_LIB_DH, 0, DH_R_KEYS_NOT_SET), "keys not set" },
48 { ERR_PACK(ERR_LIB_DH, 0, DH_R_MISSING_PUBKEY), "missing pubkey" },
49 { ERR_PACK(ERR_LIB_DH, 0, DH_R_MODULUS_TOO_LARGE), "modulus too large" },
50 { ERR_PACK(ERR_LIB_DH, 0, DH_R_MODULUS_TOO_SMALL), "modulus too small" },
51 { ERR_PACK(ERR_LIB_DH, 0, DH_R_NOT_SUITABLE_GENERATOR),
52 "not suitable generator" },
53 { ERR_PACK(ERR_LIB_DH, 0, DH_R_NO_PARAMETERS_SET), "no parameters set" },
54 { ERR_PACK(ERR_LIB_DH, 0, DH_R_NO_PRIVATE_VALUE), "no private value" },
55 { ERR_PACK(ERR_LIB_DH, 0, DH_R_PARAMETER_ENCODING_ERROR),
56 "parameter encoding error" },
57 { ERR_PACK(ERR_LIB_DH, 0, DH_R_PEER_KEY_ERROR), "peer key error" },
58 { ERR_PACK(ERR_LIB_DH, 0, DH_R_Q_TOO_LARGE), "q too large" },
59 { ERR_PACK(ERR_LIB_DH, 0, DH_R_SHARED_INFO_ERROR), "shared info error" },
60 { ERR_PACK(ERR_LIB_DH, 0, DH_R_UNABLE_TO_CHECK_GENERATOR),
61 "unable to check generator" },
62 { 0, NULL }
63 };
64
65 #endif
66
ossl_err_load_DH_strings(void)67 int ossl_err_load_DH_strings(void)
68 {
69 #ifndef OPENSSL_NO_ERR
70 if (ERR_reason_error_string(DH_str_reasons[0].error) == NULL)
71 ERR_load_strings_const(DH_str_reasons);
72 #endif
73 return 1;
74 }
75 #else
76 NON_EMPTY_TRANSLATION_UNIT
77 #endif
78