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/ecerr.h> 13e1051a39Sopenharmony_ci#include "crypto/ecerr.h" 14e1051a39Sopenharmony_ci 15e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_EC 16e1051a39Sopenharmony_ci 17e1051a39Sopenharmony_ci# ifndef OPENSSL_NO_ERR 18e1051a39Sopenharmony_ci 19e1051a39Sopenharmony_cistatic const ERR_STRING_DATA EC_str_reasons[] = { 20e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_ASN1_ERROR), "asn1 error"}, 21e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_BAD_SIGNATURE), "bad signature"}, 22e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_BIGNUM_OUT_OF_RANGE), "bignum out of range"}, 23e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_BUFFER_TOO_SMALL), "buffer too small"}, 24e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_CANNOT_INVERT), "cannot invert"}, 25e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_COORDINATES_OUT_OF_RANGE), 26e1051a39Sopenharmony_ci "coordinates out of range"}, 27e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_CURVE_DOES_NOT_SUPPORT_ECDH), 28e1051a39Sopenharmony_ci "curve does not support ecdh"}, 29e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_CURVE_DOES_NOT_SUPPORT_ECDSA), 30e1051a39Sopenharmony_ci "curve does not support ecdsa"}, 31e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_CURVE_DOES_NOT_SUPPORT_SIGNING), 32e1051a39Sopenharmony_ci "curve does not support signing"}, 33e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_DECODE_ERROR), "decode error"}, 34e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_DISCRIMINANT_IS_ZERO), 35e1051a39Sopenharmony_ci "discriminant is zero"}, 36e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_EC_GROUP_NEW_BY_NAME_FAILURE), 37e1051a39Sopenharmony_ci "ec group new by name failure"}, 38e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_EXPLICIT_PARAMS_NOT_SUPPORTED), 39e1051a39Sopenharmony_ci "explicit params not supported"}, 40e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_FAILED_MAKING_PUBLIC_KEY), 41e1051a39Sopenharmony_ci "failed making public key"}, 42e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_FIELD_TOO_LARGE), "field too large"}, 43e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_GF2M_NOT_SUPPORTED), "gf2m not supported"}, 44e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_GROUP2PKPARAMETERS_FAILURE), 45e1051a39Sopenharmony_ci "group2pkparameters failure"}, 46e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_I2D_ECPKPARAMETERS_FAILURE), 47e1051a39Sopenharmony_ci "i2d ecpkparameters failure"}, 48e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INCOMPATIBLE_OBJECTS), 49e1051a39Sopenharmony_ci "incompatible objects"}, 50e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_A), "invalid a"}, 51e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_ARGUMENT), "invalid argument"}, 52e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_B), "invalid b"}, 53e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_COFACTOR), "invalid cofactor"}, 54e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_COMPRESSED_POINT), 55e1051a39Sopenharmony_ci "invalid compressed point"}, 56e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_COMPRESSION_BIT), 57e1051a39Sopenharmony_ci "invalid compression bit"}, 58e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_CURVE), "invalid curve"}, 59e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_DIGEST), "invalid digest"}, 60e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_DIGEST_TYPE), "invalid digest type"}, 61e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_ENCODING), "invalid encoding"}, 62e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_FIELD), "invalid field"}, 63e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_FORM), "invalid form"}, 64e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_GENERATOR), "invalid generator"}, 65e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_GROUP_ORDER), "invalid group order"}, 66e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_KEY), "invalid key"}, 67e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_LENGTH), "invalid length"}, 68e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_NAMED_GROUP_CONVERSION), 69e1051a39Sopenharmony_ci "invalid named group conversion"}, 70e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_OUTPUT_LENGTH), 71e1051a39Sopenharmony_ci "invalid output length"}, 72e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_P), "invalid p"}, 73e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_PEER_KEY), "invalid peer key"}, 74e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_PENTANOMIAL_BASIS), 75e1051a39Sopenharmony_ci "invalid pentanomial basis"}, 76e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_PRIVATE_KEY), "invalid private key"}, 77e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_SEED), "invalid seed"}, 78e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_TRINOMIAL_BASIS), 79e1051a39Sopenharmony_ci "invalid trinomial basis"}, 80e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_KDF_PARAMETER_ERROR), "kdf parameter error"}, 81e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_KEYS_NOT_SET), "keys not set"}, 82e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_LADDER_POST_FAILURE), "ladder post failure"}, 83e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_LADDER_PRE_FAILURE), "ladder pre failure"}, 84e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_LADDER_STEP_FAILURE), "ladder step failure"}, 85e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_MISSING_OID), "missing OID"}, 86e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_MISSING_PARAMETERS), "missing parameters"}, 87e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_MISSING_PRIVATE_KEY), "missing private key"}, 88e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_NEED_NEW_SETUP_VALUES), 89e1051a39Sopenharmony_ci "need new setup values"}, 90e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_NOT_A_NIST_PRIME), "not a NIST prime"}, 91e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_NOT_IMPLEMENTED), "not implemented"}, 92e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_NOT_INITIALIZED), "not initialized"}, 93e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_NO_PARAMETERS_SET), "no parameters set"}, 94e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_NO_PRIVATE_VALUE), "no private value"}, 95e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_OPERATION_NOT_SUPPORTED), 96e1051a39Sopenharmony_ci "operation not supported"}, 97e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_PASSED_NULL_PARAMETER), 98e1051a39Sopenharmony_ci "passed null parameter"}, 99e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_PEER_KEY_ERROR), "peer key error"}, 100e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_POINT_ARITHMETIC_FAILURE), 101e1051a39Sopenharmony_ci "point arithmetic failure"}, 102e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_POINT_AT_INFINITY), "point at infinity"}, 103e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_POINT_COORDINATES_BLIND_FAILURE), 104e1051a39Sopenharmony_ci "point coordinates blind failure"}, 105e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_POINT_IS_NOT_ON_CURVE), 106e1051a39Sopenharmony_ci "point is not on curve"}, 107e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_RANDOM_NUMBER_GENERATION_FAILED), 108e1051a39Sopenharmony_ci "random number generation failed"}, 109e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_SHARED_INFO_ERROR), "shared info error"}, 110e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_SLOT_FULL), "slot full"}, 111e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_TOO_MANY_RETRIES), "too many retries"}, 112e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_UNDEFINED_GENERATOR), "undefined generator"}, 113e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_UNDEFINED_ORDER), "undefined order"}, 114e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_UNKNOWN_COFACTOR), "unknown cofactor"}, 115e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_UNKNOWN_GROUP), "unknown group"}, 116e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_UNKNOWN_ORDER), "unknown order"}, 117e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_UNSUPPORTED_FIELD), "unsupported field"}, 118e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_WRONG_CURVE_PARAMETERS), 119e1051a39Sopenharmony_ci "wrong curve parameters"}, 120e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_EC, 0, EC_R_WRONG_ORDER), "wrong order"}, 121e1051a39Sopenharmony_ci {0, NULL} 122e1051a39Sopenharmony_ci}; 123e1051a39Sopenharmony_ci 124e1051a39Sopenharmony_ci# endif 125e1051a39Sopenharmony_ci 126e1051a39Sopenharmony_ciint ossl_err_load_EC_strings(void) 127e1051a39Sopenharmony_ci{ 128e1051a39Sopenharmony_ci# ifndef OPENSSL_NO_ERR 129e1051a39Sopenharmony_ci if (ERR_reason_error_string(EC_str_reasons[0].error) == NULL) 130e1051a39Sopenharmony_ci ERR_load_strings_const(EC_str_reasons); 131e1051a39Sopenharmony_ci# endif 132e1051a39Sopenharmony_ci return 1; 133e1051a39Sopenharmony_ci} 134e1051a39Sopenharmony_ci#else 135e1051a39Sopenharmony_ciNON_EMPTY_TRANSLATION_UNIT 136e1051a39Sopenharmony_ci#endif 137