]>
Commit | Line | Data |
---|---|---|
3d328a44 JL |
1 | /* |
2 | * Generated by util/mkerr.pl DO NOT EDIT | |
d0b79f86 | 3 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. |
3d328a44 | 4 | * |
f9f859ad | 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use |
3d328a44 JL |
6 | * this file except in compliance with the License. You can obtain a copy |
7 | * in the file LICENSE in the source distribution or at | |
8 | * https://www.openssl.org/source/license.html | |
9 | */ | |
10 | ||
11 | #include <openssl/err.h> | |
25f2138b | 12 | #include "crypto/sm2err.h" |
3d328a44 JL |
13 | |
14 | #ifndef OPENSSL_NO_ERR | |
15 | ||
3d328a44 JL |
16 | static const ERR_STRING_DATA SM2_str_reasons[] = { |
17 | {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_ASN1_ERROR), "asn1 error"}, | |
3d328a44 | 18 | {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_BAD_SIGNATURE), "bad signature"}, |
ddb634fe | 19 | {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_BUFFER_TOO_SMALL), "buffer too small"}, |
675f4cee PY |
20 | {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_DIST_ID_TOO_LARGE), "dist id too large"}, |
21 | {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_ID_NOT_SET), "id not set"}, | |
4803717f | 22 | {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_ID_TOO_LARGE), "id too large"}, |
ddb634fe | 23 | {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_CURVE), "invalid curve"}, |
3d328a44 JL |
24 | {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_DIGEST), "invalid digest"}, |
25 | {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_DIGEST_TYPE), | |
26 | "invalid digest type"}, | |
27 | {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_ENCODING), "invalid encoding"}, | |
28 | {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_INVALID_FIELD), "invalid field"}, | |
ddb634fe | 29 | {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_NO_PARAMETERS_SET), "no parameters set"}, |
675f4cee | 30 | {ERR_PACK(ERR_LIB_SM2, 0, SM2_R_USER_ID_TOO_LARGE), "user id too large"}, |
3d328a44 JL |
31 | {0, NULL} |
32 | }; | |
33 | ||
34 | #endif | |
35 | ||
36 | int ERR_load_SM2_strings(void) | |
37 | { | |
38 | #ifndef OPENSSL_NO_ERR | |
0cd1b144 | 39 | if (ERR_reason_error_string(SM2_str_reasons[0].error) == NULL) |
3d328a44 | 40 | ERR_load_strings_const(SM2_str_reasons); |
3d328a44 JL |
41 | #endif |
42 | return 1; | |
43 | } |