/*
 * Generated by util/mkerr.pl DO NOT EDIT
 * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
 *
 * Licensed under the OpenSSL license (the "License").  You may not use
 * this file except in compliance with the License.  You can obtain a copy
 * in the file LICENSE in the source distribution or at
 * https://www.openssl.org/source/license.html
 */

#include <stdio.h>
#include <openssl/err.h>
#include <openssl/gmapi.h>

/* BEGIN ERROR CODES */
#ifndef OPENSSL_NO_ERR

# define ERR_FUNC(func) ERR_PACK(ERR_LIB_GMAPI,func,0)
# define ERR_REASON(reason) ERR_PACK(ERR_LIB_GMAPI,0,reason)

static ERR_STRING_DATA GMAPI_str_functs[] = {
    {ERR_FUNC(GMAPI_F_D2I_ECCCIPHER), "d2i_ECCCipher"},
    {ERR_FUNC(GMAPI_F_D2I_ECCCIPHERBLOB), "d2i_ECCCIPHERBLOB"},
    {ERR_FUNC(GMAPI_F_D2I_ECCCIPHERBLOB_BIO), "d2i_ECCCIPHERBLOB_bio"},
    {ERR_FUNC(GMAPI_F_D2I_ECCCIPHERBLOB_FP), "d2i_ECCCIPHERBLOB_fp"},
    {ERR_FUNC(GMAPI_F_D2I_ECCSIGNATURE), "d2i_ECCSignature"},
    {ERR_FUNC(GMAPI_F_D2I_ECCSIGNATUREBLOB), "d2i_ECCSIGNATUREBLOB"},
    {ERR_FUNC(GMAPI_F_D2I_ECCSIGNATUREBLOB_BIO), "d2i_ECCSIGNATUREBLOB_bio"},
    {ERR_FUNC(GMAPI_F_D2I_ECCSIGNATUREBLOB_FP), "d2i_ECCSIGNATUREBLOB_fp"},
    {ERR_FUNC(GMAPI_F_ECCPRIVATEKEYBLOB_SET_PRIVATE_KEY),
     "ECCPRIVATEKEYBLOB_set_private_key"},
    {ERR_FUNC(GMAPI_F_ECDSA_SIG_GET_ECCSIGNATURE),
     "ECDSA_SIG_get_ECCSignature"},
    {ERR_FUNC(GMAPI_F_ECDSA_SIG_GET_ECCSIGNATUREBLOB),
     "ECDSA_SIG_get_ECCSIGNATUREBLOB"},
    {ERR_FUNC(GMAPI_F_ECDSA_SIG_NEW_FROM_ECCSIGNATURE),
     "ECDSA_SIG_new_from_ECCSignature"},
    {ERR_FUNC(GMAPI_F_ECDSA_SIG_NEW_FROM_ECCSIGNATUREBLOB),
     "ECDSA_SIG_new_from_ECCSIGNATUREBLOB"},
    {ERR_FUNC(GMAPI_F_ECDSA_SIG_SET_ECCSIGNATURE),
     "ECDSA_SIG_set_ECCSignature"},
    {ERR_FUNC(GMAPI_F_ECDSA_SIG_SET_ECCSIGNATUREBLOB),
     "ECDSA_SIG_set_ECCSIGNATUREBLOB"},
    {ERR_FUNC(GMAPI_F_ECIES_CIPHERTEXT_VALUE_GET_ECCCIPHER),
     "ECIES_CIPHERTEXT_VALUE_get_ECCCipher"},
    {ERR_FUNC(GMAPI_F_ECIES_CIPHERTEXT_VALUE_GET_ECCCIPHERBLOB),
     "ECIES_CIPHERTEXT_VALUE_get_ECCCIPHERBLOB"},
    {ERR_FUNC(GMAPI_F_ECIES_CIPHERTEXT_VALUE_NEW_FROM_ECCCIPHER),
     "ECIES_CIPHERTEXT_VALUE_new_from_ECCCipher"},
    {ERR_FUNC(GMAPI_F_ECIES_CIPHERTEXT_VALUE_NEW_FROM_ECCCIPHERBLOB),
     "ECIES_CIPHERTEXT_VALUE_new_from_ECCCIPHERBLOB"},
    {ERR_FUNC(GMAPI_F_ECIES_CIPHERTEXT_VALUE_SET_ECCCIPHER),
     "ECIES_CIPHERTEXT_VALUE_set_ECCCipher"},
    {ERR_FUNC(GMAPI_F_ECIES_CIPHERTEXT_VALUE_SET_ECCCIPHERBLOB),
     "ECIES_CIPHERTEXT_VALUE_set_ECCCIPHERBLOB"},
    {ERR_FUNC(GMAPI_F_EC_KEY_GET_ECCPRIVATEKEYBLOB),
     "EC_KEY_get_ECCPRIVATEKEYBLOB"},
    {ERR_FUNC(GMAPI_F_EC_KEY_GET_ECCPUBLICKEYBLOB),
     "EC_KEY_get_ECCPUBLICKEYBLOB"},
    {ERR_FUNC(GMAPI_F_EC_KEY_GET_ECCREFPRIVATEKEY),
     "EC_KEY_get_ECCrefPrivateKey"},
    {ERR_FUNC(GMAPI_F_EC_KEY_GET_ECCREFPUBLICKEY),
     "EC_KEY_get_ECCrefPublicKey"},
    {ERR_FUNC(GMAPI_F_EC_KEY_NEW_FROM_ECCPRIVATEKEYBLOB),
     "EC_KEY_new_from_ECCPRIVATEKEYBLOB"},
    {ERR_FUNC(GMAPI_F_EC_KEY_NEW_FROM_ECCPUBLICKEYBLOB),
     "EC_KEY_new_from_ECCPUBLICKEYBLOB"},
    {ERR_FUNC(GMAPI_F_EC_KEY_NEW_FROM_ECCREFPRIVATEKEY),
     "EC_KEY_new_from_ECCrefPrivateKey"},
    {ERR_FUNC(GMAPI_F_EC_KEY_NEW_FROM_ECCREFPUBLICKEY),
     "EC_KEY_new_from_ECCrefPublicKey"},
    {ERR_FUNC(GMAPI_F_EC_KEY_SET_ECCPRIVATEKEYBLOB),
     "EC_KEY_set_ECCPRIVATEKEYBLOB"},
    {ERR_FUNC(GMAPI_F_EC_KEY_SET_ECCPUBLICKEYBLOB),
     "EC_KEY_set_ECCPUBLICKEYBLOB"},
    {ERR_FUNC(GMAPI_F_EC_KEY_SET_ECCREFPRIVATEKEY),
     "EC_KEY_set_ECCrefPrivateKey"},
    {ERR_FUNC(GMAPI_F_EC_KEY_SET_ECCREFPUBLICKEY),
     "EC_KEY_set_ECCrefPublicKey"},
    {ERR_FUNC(GMAPI_F_EVP_CIPHER_CTX_GET_SGD), "EVP_CIPHER_CTX_get_sgd"},
    {ERR_FUNC(GMAPI_F_EVP_CIPHER_GET_SGD), "EVP_CIPHER_get_sgd"},
    {ERR_FUNC(GMAPI_F_EVP_MD_GET_SGD), "EVP_MD_get_sgd"},
    {ERR_FUNC(GMAPI_F_EVP_PKEY_GET_SGD), "EVP_PKEY_get_sgd"},
    {ERR_FUNC(GMAPI_F_I2D_ECCCIPHER), "i2d_ECCCipher"},
    {ERR_FUNC(GMAPI_F_I2D_ECCCIPHERBLOB), "i2d_ECCCIPHERBLOB"},
    {ERR_FUNC(GMAPI_F_I2D_ECCCIPHERBLOB_BIO), "i2d_ECCCIPHERBLOB_bio"},
    {ERR_FUNC(GMAPI_F_I2D_ECCCIPHERBLOB_FP), "i2d_ECCCIPHERBLOB_fp"},
    {ERR_FUNC(GMAPI_F_I2D_ECCSIGNATURE), "i2d_ECCSignature"},
    {ERR_FUNC(GMAPI_F_I2D_ECCSIGNATUREBLOB), "i2d_ECCSIGNATUREBLOB"},
    {ERR_FUNC(GMAPI_F_I2D_ECCSIGNATUREBLOB_BIO), "i2d_ECCSIGNATUREBLOB_bio"},
    {ERR_FUNC(GMAPI_F_I2D_ECCSIGNATUREBLOB_FP), "i2d_ECCSIGNATUREBLOB_fp"},
    {ERR_FUNC(GMAPI_F_RSA_GET_RSAPRIVATEKEYBLOB),
     "RSA_get_RSAPRIVATEKEYBLOB"},
    {ERR_FUNC(GMAPI_F_RSA_GET_RSAPUBLICKEYBLOB), "RSA_get_RSAPUBLICKEYBLOB"},
    {ERR_FUNC(GMAPI_F_RSA_GET_RSAREFPRIVATEKEY), "RSA_get_RSArefPrivateKey"},
    {ERR_FUNC(GMAPI_F_RSA_GET_RSAREFPUBLICKEY), "RSA_get_RSArefPublicKey"},
    {ERR_FUNC(GMAPI_F_RSA_NEW_FROM_RSAPRIVATEKEYBLOB),
     "RSA_new_from_RSAPRIVATEKEYBLOB"},
    {ERR_FUNC(GMAPI_F_RSA_NEW_FROM_RSAPUBLICKEYBLOB),
     "RSA_new_from_RSAPUBLICKEYBLOB"},
    {ERR_FUNC(GMAPI_F_RSA_NEW_FROM_RSAREFPRIVATEKEY),
     "RSA_new_from_RSArefPrivateKey"},
    {ERR_FUNC(GMAPI_F_RSA_NEW_FROM_RSAREFPUBLICKEY),
     "RSA_new_from_RSArefPublicKey"},
    {ERR_FUNC(GMAPI_F_RSA_SET_RSAPRIVATEKEYBLOB),
     "RSA_set_RSAPRIVATEKEYBLOB"},
    {ERR_FUNC(GMAPI_F_RSA_SET_RSAPUBLICKEYBLOB), "RSA_set_RSAPUBLICKEYBLOB"},
    {ERR_FUNC(GMAPI_F_RSA_SET_RSAREFPRIVATEKEY), "RSA_set_RSArefPrivateKey"},
    {ERR_FUNC(GMAPI_F_RSA_SET_RSAREFPUBLICKEY), "RSA_set_RSArefPublicKey"},
    {ERR_FUNC(GMAPI_F_SM2CIPHERTEXTVALUE_GET_ECCCIPHER),
     "SM2CiphertextValue_get_ECCCipher"},
    {ERR_FUNC(GMAPI_F_SM2CIPHERTEXTVALUE_GET_ECCCIPHERBLOB),
     "SM2CiphertextValue_get_ECCCIPHERBLOB"},
    {ERR_FUNC(GMAPI_F_SM2CIPHERTEXTVALUE_NEW_FROM_ECCCIPHER),
     "SM2CiphertextValue_new_from_ECCCipher"},
    {ERR_FUNC(GMAPI_F_SM2CIPHERTEXTVALUE_NEW_FROM_ECCCIPHERBLOB),
     "SM2CiphertextValue_new_from_ECCCIPHERBLOB"},
    {ERR_FUNC(GMAPI_F_SM2CIPHERTEXTVALUE_SET_ECCCIPHER),
     "SM2CiphertextValue_set_ECCCipher"},
    {ERR_FUNC(GMAPI_F_SM2CIPHERTEXTVALUE_SET_ECCCIPHERBLOB),
     "SM2CiphertextValue_set_ECCCIPHERBLOB"},
    {0, NULL}
};

static ERR_STRING_DATA GMAPI_str_reasons[] = {
    {ERR_REASON(GMAPI_R_BUFFER_TOO_SMALL), "buffer too small"},
    {ERR_REASON(GMAPI_R_DECODE_EC_PRIVATE_KEY_FAILED),
     "decode ec private key failed"},
    {ERR_REASON(GMAPI_R_DECODE_EC_PUBLIC_KEY_FAILED),
     "decode ec public key failed"},
    {ERR_REASON(GMAPI_R_ENCODE_RSA_PUBLIC_KEY_FAILED),
     "encode rsa public key failed"},
    {ERR_REASON(GMAPI_R_INVALID_ALGOR), "invalid algor"},
    {ERR_REASON(GMAPI_R_INVALID_BIGNUM_LENGTH), "invalid bignum length"},
    {ERR_REASON(GMAPI_R_INVALID_CIPHERTEXT_LENGTH),
     "invalid ciphertext length"},
    {ERR_REASON(GMAPI_R_INVALID_CIPHERTEXT_MAC), "invalid ciphertext mac"},
    {ERR_REASON(GMAPI_R_INVALID_CIPHERTEXT_POINT),
     "invalid ciphertext point"},
    {ERR_REASON(GMAPI_R_INVALID_CIPHETEXT_LENGTH),
     "invalid ciphetext length"},
    {ERR_REASON(GMAPI_R_INVALID_EC_KEY), "invalid ec key"},
    {ERR_REASON(GMAPI_R_INVALID_EC_PRIVATE_KEY), "invalid ec private key"},
    {ERR_REASON(GMAPI_R_INVALID_EC_PUBLIC_KEY), "invalid ec public key"},
    {ERR_REASON(GMAPI_R_INVALID_KEY_LENGTH), "invalid key length"},
    {ERR_REASON(GMAPI_R_INVALID_PRIVATE_KEY), "invalid private key"},
    {ERR_REASON(GMAPI_R_INVALID_PUBLIC_KEY), "invalid public key"},
    {ERR_REASON(GMAPI_R_INVALID_RSA_KEY_LENGTH), "invalid rsa key length"},
    {ERR_REASON(GMAPI_R_INVALID_RSA_PRIVATE_KEY), "invalid rsa private key"},
    {ERR_REASON(GMAPI_R_INVALID_RSA_PUBLIC_KEY), "invalid rsa public key"},
    {ERR_REASON(GMAPI_R_INVALID_SIGNATURE), "invalid signature"},
    {ERR_REASON(GMAPI_R_INVALID_SKF_CIPHERTEXT), "invalid skf ciphertext"},
    {ERR_REASON(GMAPI_R_INVALID_SKF_EC_CIPHERTEXT),
     "invalid skf ec ciphertext"},
    {ERR_REASON(GMAPI_R_INVALID_SM2_CIPHERTEXT), "invalid sm2 ciphertext"},
    {ERR_REASON(GMAPI_R_INVALID_SM2_CIPHERTEXT_MAC_LENGTH),
     "invalid sm2 ciphertext mac length"},
    {ERR_REASON(GMAPI_R_INVALID_SM2_PRIVATE_KEY), "invalid sm2 private key"},
    {ERR_REASON(GMAPI_R_INVALID_SM2_SIGNATURE), "invalid sm2 signature"},
    {ERR_REASON(GMAPI_R_MALLOC_FAILED), "malloc failed"},
    {ERR_REASON(GMAPI_R_NOT_CONVERTABLE), "not convertable"},
    {ERR_REASON(GMAPI_R_NOT_IMPLEMENTED), "not implemented"},
    {ERR_REASON(GMAPI_R_NOT_SUPPORTED_GMAPI_CIPHER),
     "not supported gmapi cipher"},
    {ERR_REASON(GMAPI_R_NOT_SUPPORTED_PKEY), "not supported pkey"},
    {0, NULL}
};

#endif

int ERR_load_GMAPI_strings(void)
{
#ifndef OPENSSL_NO_ERR

    if (ERR_func_error_string(GMAPI_str_functs[0].error) == NULL) {
        ERR_load_strings(0, GMAPI_str_functs);
        ERR_load_strings(0, GMAPI_str_reasons);
    }
#endif
    return 1;
}
