1e1051a39Sopenharmony_ci/*
2e1051a39Sopenharmony_ci * Generated by util/mkerr.pl DO NOT EDIT
3e1051a39Sopenharmony_ci * Copyright 1995-2021 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 "crypto/sm2err.h"
13e1051a39Sopenharmony_ci
14e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_SM2
15e1051a39Sopenharmony_ci
16e1051a39Sopenharmony_ci# ifndef OPENSSL_NO_ERR
17e1051a39Sopenharmony_ci
18e1051a39Sopenharmony_cistatic const ERR_STRING_DATA SM2_str_reasons[] = {
19e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_ASN1_ERROR), "asn1 error"},
20e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_BAD_SIGNATURE), "bad signature"},
21e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_BUFFER_TOO_SMALL), "buffer too small"},
22e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_DIST_ID_TOO_LARGE), "dist id too large"},
23e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_ID_NOT_SET), "id not set"},
24e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_ID_TOO_LARGE), "id too large"},
25e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_CURVE), "invalid curve"},
26e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_DIGEST), "invalid digest"},
27e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_DIGEST_TYPE),
28e1051a39Sopenharmony_ci    "invalid digest type"},
29e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_ENCODING), "invalid encoding"},
30e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_FIELD), "invalid field"},
31e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_PRIVATE_KEY),
32e1051a39Sopenharmony_ci    "invalid private key"},
33e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_NO_PARAMETERS_SET), "no parameters set"},
34e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_USER_ID_TOO_LARGE), "user id too large"},
35e1051a39Sopenharmony_ci    {0, NULL}
36e1051a39Sopenharmony_ci};
37e1051a39Sopenharmony_ci
38e1051a39Sopenharmony_ci# endif
39e1051a39Sopenharmony_ci
40e1051a39Sopenharmony_ciint ossl_err_load_SM2_strings(void)
41e1051a39Sopenharmony_ci{
42e1051a39Sopenharmony_ci# ifndef OPENSSL_NO_ERR
43e1051a39Sopenharmony_ci    if (ERR_reason_error_string(SM2_str_reasons[0].error) == NULL)
44e1051a39Sopenharmony_ci        ERR_load_strings_const(SM2_str_reasons);
45e1051a39Sopenharmony_ci# endif
46e1051a39Sopenharmony_ci    return 1;
47e1051a39Sopenharmony_ci}
48e1051a39Sopenharmony_ci#else
49e1051a39Sopenharmony_ciNON_EMPTY_TRANSLATION_UNIT
50e1051a39Sopenharmony_ci#endif
51