1e1051a39Sopenharmony_ci/* 2e1051a39Sopenharmony_ci * Generated by util/mkerr.pl DO NOT EDIT 3e1051a39Sopenharmony_ci * Copyright 1995-2022 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/bnerr.h> 13e1051a39Sopenharmony_ci#include "crypto/bnerr.h" 14e1051a39Sopenharmony_ci 15e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_ERR 16e1051a39Sopenharmony_ci 17e1051a39Sopenharmony_cistatic const ERR_STRING_DATA BN_str_reasons[] = { 18e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_ARG2_LT_ARG3), "arg2 lt arg3"}, 19e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_BAD_RECIPROCAL), "bad reciprocal"}, 20e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_BIGNUM_TOO_LONG), "bignum too long"}, 21e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_BITS_TOO_SMALL), "bits too small"}, 22e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_CALLED_WITH_EVEN_MODULUS), 23e1051a39Sopenharmony_ci "called with even modulus"}, 24e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_DIV_BY_ZERO), "div by zero"}, 25e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_ENCODING_ERROR), "encoding error"}, 26e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_EXPAND_ON_STATIC_BIGNUM_DATA), 27e1051a39Sopenharmony_ci "expand on static bignum data"}, 28e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_INPUT_NOT_REDUCED), "input not reduced"}, 29e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_INVALID_LENGTH), "invalid length"}, 30e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_INVALID_RANGE), "invalid range"}, 31e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_INVALID_SHIFT), "invalid shift"}, 32e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_NOT_A_SQUARE), "not a square"}, 33e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_NOT_INITIALIZED), "not initialized"}, 34e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_NO_INVERSE), "no inverse"}, 35e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_NO_PRIME_CANDIDATE), "no prime candidate"}, 36e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_NO_SOLUTION), "no solution"}, 37e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_NO_SUITABLE_DIGEST), "no suitable digest"}, 38e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_PRIVATE_KEY_TOO_LARGE), 39e1051a39Sopenharmony_ci "private key too large"}, 40e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_P_IS_NOT_PRIME), "p is not prime"}, 41e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_TOO_MANY_ITERATIONS), "too many iterations"}, 42e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_BN, 0, BN_R_TOO_MANY_TEMPORARY_VARIABLES), 43e1051a39Sopenharmony_ci "too many temporary variables"}, 44e1051a39Sopenharmony_ci {0, NULL} 45e1051a39Sopenharmony_ci}; 46e1051a39Sopenharmony_ci 47e1051a39Sopenharmony_ci#endif 48e1051a39Sopenharmony_ci 49e1051a39Sopenharmony_ciint ossl_err_load_BN_strings(void) 50e1051a39Sopenharmony_ci{ 51e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_ERR 52e1051a39Sopenharmony_ci if (ERR_reason_error_string(BN_str_reasons[0].error) == NULL) 53e1051a39Sopenharmony_ci ERR_load_strings_const(BN_str_reasons); 54e1051a39Sopenharmony_ci#endif 55e1051a39Sopenharmony_ci return 1; 56e1051a39Sopenharmony_ci} 57