2018-01-25 00:56:02 +08:00
|
|
|
/*
|
|
|
|
* Generated by util/mkerr.pl DO NOT EDIT
|
2021-01-28 20:54:57 +08:00
|
|
|
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
2018-01-25 00:56:02 +08:00
|
|
|
*
|
2018-12-06 20:56:38 +08:00
|
|
|
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
2018-01-25 00:56:02 +08:00
|
|
|
* 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 <openssl/err.h>
|
2019-09-28 06:45:33 +08:00
|
|
|
#include "crypto/sm2err.h"
|
2018-01-25 00:56:02 +08:00
|
|
|
|
2020-11-12 17:36:47 +08:00
|
|
|
#ifndef OPENSSL_NO_SM2
|
|
|
|
|
|
|
|
# ifndef OPENSSL_NO_ERR
|
2018-01-25 00:56:02 +08:00
|
|
|
|
|
|
|
static const ERR_STRING_DATA SM2_str_reasons[] = {
|
|
|
|
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_ASN1_ERROR), "asn1 error"},
|
|
|
|
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_BAD_SIGNATURE), "bad signature"},
|
2018-06-19 03:51:56 +08:00
|
|
|
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_BUFFER_TOO_SMALL), "buffer too small"},
|
2018-09-05 15:19:17 +08:00
|
|
|
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_DIST_ID_TOO_LARGE), "dist id too large"},
|
|
|
|
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_ID_NOT_SET), "id not set"},
|
2018-09-04 17:21:10 +08:00
|
|
|
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_ID_TOO_LARGE), "id too large"},
|
2018-06-19 03:51:56 +08:00
|
|
|
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_CURVE), "invalid curve"},
|
2018-01-25 00:56:02 +08:00
|
|
|
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_DIGEST), "invalid digest"},
|
|
|
|
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_DIGEST_TYPE),
|
|
|
|
"invalid digest type"},
|
|
|
|
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_ENCODING), "invalid encoding"},
|
|
|
|
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_FIELD), "invalid field"},
|
2020-11-10 07:11:48 +08:00
|
|
|
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_PRIVATE_KEY),
|
|
|
|
"invalid private key"},
|
2018-06-19 03:51:56 +08:00
|
|
|
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_NO_PARAMETERS_SET), "no parameters set"},
|
2018-09-05 15:19:17 +08:00
|
|
|
{ERR_PACK(ERR_LIB_SM2, 0, SM2_R_USER_ID_TOO_LARGE), "user id too large"},
|
2018-01-25 00:56:02 +08:00
|
|
|
{0, NULL}
|
|
|
|
};
|
|
|
|
|
2020-11-12 17:36:47 +08:00
|
|
|
# endif
|
2018-01-25 00:56:02 +08:00
|
|
|
|
2021-05-25 10:04:22 +08:00
|
|
|
int ossl_err_load_SM2_strings(void)
|
2018-01-25 00:56:02 +08:00
|
|
|
{
|
2020-11-12 17:36:47 +08:00
|
|
|
# ifndef OPENSSL_NO_ERR
|
2019-09-05 03:45:56 +08:00
|
|
|
if (ERR_reason_error_string(SM2_str_reasons[0].error) == NULL)
|
2018-01-25 00:56:02 +08:00
|
|
|
ERR_load_strings_const(SM2_str_reasons);
|
2020-11-12 17:36:47 +08:00
|
|
|
# endif
|
2018-01-25 00:56:02 +08:00
|
|
|
return 1;
|
|
|
|
}
|
2020-11-12 17:36:47 +08:00
|
|
|
#else
|
|
|
|
NON_EMPTY_TRANSLATION_UNIT
|
|
|
|
#endif
|