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