]>
Commit | Line | Data |
---|---|---|
b6cff313 | 1 | /* |
0cd0a820 | 2 | * Generated by util/mkerr.pl DO NOT EDIT |
9aaecbfc | 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. |
6d311938 | 4 | * |
e38873f5 | 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use |
b6cff313 RS |
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 | |
d02b48c6 | 9 | */ |
6d311938 | 10 | |
ec577822 | 11 | #include <openssl/err.h> |
52df25cf | 12 | #include <openssl/dherr.h> |
d02b48c6 | 13 | |
cf1b7d96 | 14 | #ifndef OPENSSL_NO_ERR |
29dc3508 | 15 | |
52df25cf RS |
16 | static const ERR_STRING_DATA DH_str_reasons[] = { |
17 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_BAD_GENERATOR), "bad generator"}, | |
18 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_BN_DECODE_ERROR), "bn decode error"}, | |
19 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_BN_ERROR), "bn error"}, | |
b0004708 PY |
20 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_INVALID_J_VALUE), |
21 | "check invalid j value"}, | |
22 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_INVALID_Q_VALUE), | |
23 | "check invalid q value"}, | |
24 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_PUBKEY_INVALID), | |
25 | "check pubkey invalid"}, | |
26 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_PUBKEY_TOO_LARGE), | |
27 | "check pubkey too large"}, | |
28 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_PUBKEY_TOO_SMALL), | |
29 | "check pubkey too small"}, | |
30 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_P_NOT_PRIME), "check p not prime"}, | |
31 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_P_NOT_SAFE_PRIME), | |
32 | "check p not safe prime"}, | |
33 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_CHECK_Q_NOT_PRIME), "check q not prime"}, | |
52df25cf | 34 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_DECODE_ERROR), "decode error"}, |
549be253 DSH |
35 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_INVALID_PARAMETER_NAME), |
36 | "invalid parameter name"}, | |
37 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_INVALID_PARAMETER_NID), | |
38 | "invalid parameter nid"}, | |
52df25cf RS |
39 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_INVALID_PUBKEY), "invalid public key"}, |
40 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_KDF_PARAMETER_ERROR), "kdf parameter error"}, | |
41 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_KEYS_NOT_SET), "keys not set"}, | |
b0004708 | 42 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_MISSING_PUBKEY), "missing pubkey"}, |
52df25cf | 43 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_MODULUS_TOO_LARGE), "modulus too large"}, |
b0004708 PY |
44 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_NOT_SUITABLE_GENERATOR), |
45 | "not suitable generator"}, | |
52df25cf RS |
46 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_NO_PARAMETERS_SET), "no parameters set"}, |
47 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_NO_PRIVATE_VALUE), "no private value"}, | |
48 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_PARAMETER_ENCODING_ERROR), | |
49 | "parameter encoding error"}, | |
50 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_PEER_KEY_ERROR), "peer key error"}, | |
51 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_SHARED_INFO_ERROR), "shared info error"}, | |
b0004708 PY |
52 | {ERR_PACK(ERR_LIB_DH, 0, DH_R_UNABLE_TO_CHECK_GENERATOR), |
53 | "unable to check generator"}, | |
0f113f3e MC |
54 | {0, NULL} |
55 | }; | |
d02b48c6 | 56 | |
58964a49 RE |
57 | #endif |
58 | ||
69588edb | 59 | int ERR_load_DH_strings(void) |
0f113f3e | 60 | { |
47a9d527 | 61 | #ifndef OPENSSL_NO_ERR |
cbfa5b03 | 62 | if (ERR_func_error_string(DH_str_reasons[0].error) == NULL) |
52df25cf | 63 | ERR_load_strings_const(DH_str_reasons); |
47a9d527 | 64 | #endif |
69588edb | 65 | return 1; |
0f113f3e | 66 | } |