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 <openssl/tserr.h>
13e1051a39Sopenharmony_ci#include "crypto/tserr.h"
14e1051a39Sopenharmony_ci
15e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_TS
16e1051a39Sopenharmony_ci
17e1051a39Sopenharmony_ci# ifndef OPENSSL_NO_ERR
18e1051a39Sopenharmony_ci
19e1051a39Sopenharmony_cistatic const ERR_STRING_DATA TS_str_reasons[] = {
20e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_BAD_PKCS7_TYPE), "bad pkcs7 type"},
21e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_BAD_TYPE), "bad type"},
22e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_CANNOT_LOAD_CERT), "cannot load certificate"},
23e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_CANNOT_LOAD_KEY), "cannot load private key"},
24e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_CERTIFICATE_VERIFY_ERROR),
25e1051a39Sopenharmony_ci    "certificate verify error"},
26e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_COULD_NOT_SET_ENGINE),
27e1051a39Sopenharmony_ci    "could not set engine"},
28e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_COULD_NOT_SET_TIME), "could not set time"},
29e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_DETACHED_CONTENT), "detached content"},
30e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_ESS_ADD_SIGNING_CERT_ERROR),
31e1051a39Sopenharmony_ci    "ess add signing cert error"},
32e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_ESS_ADD_SIGNING_CERT_V2_ERROR),
33e1051a39Sopenharmony_ci    "ess add signing cert v2 error"},
34e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_ESS_SIGNING_CERTIFICATE_ERROR),
35e1051a39Sopenharmony_ci    "ess signing certificate error"},
36e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_INVALID_NULL_POINTER),
37e1051a39Sopenharmony_ci    "invalid null pointer"},
38e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_INVALID_SIGNER_CERTIFICATE_PURPOSE),
39e1051a39Sopenharmony_ci    "invalid signer certificate purpose"},
40e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_MESSAGE_IMPRINT_MISMATCH),
41e1051a39Sopenharmony_ci    "message imprint mismatch"},
42e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_NONCE_MISMATCH), "nonce mismatch"},
43e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_NONCE_NOT_RETURNED), "nonce not returned"},
44e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_NO_CONTENT), "no content"},
45e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_NO_TIME_STAMP_TOKEN), "no time stamp token"},
46e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_PKCS7_ADD_SIGNATURE_ERROR),
47e1051a39Sopenharmony_ci    "pkcs7 add signature error"},
48e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_PKCS7_ADD_SIGNED_ATTR_ERROR),
49e1051a39Sopenharmony_ci    "pkcs7 add signed attr error"},
50e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_PKCS7_TO_TS_TST_INFO_FAILED),
51e1051a39Sopenharmony_ci    "pkcs7 to ts tst info failed"},
52e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_POLICY_MISMATCH), "policy mismatch"},
53e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE),
54e1051a39Sopenharmony_ci    "private key does not match certificate"},
55e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_RESPONSE_SETUP_ERROR),
56e1051a39Sopenharmony_ci    "response setup error"},
57e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_SIGNATURE_FAILURE), "signature failure"},
58e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_THERE_MUST_BE_ONE_SIGNER),
59e1051a39Sopenharmony_ci    "there must be one signer"},
60e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_TIME_SYSCALL_ERROR), "time syscall error"},
61e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_TOKEN_NOT_PRESENT), "token not present"},
62e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_TOKEN_PRESENT), "token present"},
63e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_TSA_NAME_MISMATCH), "tsa name mismatch"},
64e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_TSA_UNTRUSTED), "tsa untrusted"},
65e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_TST_INFO_SETUP_ERROR),
66e1051a39Sopenharmony_ci    "tst info setup error"},
67e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_TS_DATASIGN), "ts datasign"},
68e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_UNACCEPTABLE_POLICY), "unacceptable policy"},
69e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_UNSUPPORTED_MD_ALGORITHM),
70e1051a39Sopenharmony_ci    "unsupported md algorithm"},
71e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_UNSUPPORTED_VERSION), "unsupported version"},
72e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_VAR_BAD_VALUE), "var bad value"},
73e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_VAR_LOOKUP_FAILURE),
74e1051a39Sopenharmony_ci    "cannot find config variable"},
75e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_TS, 0, TS_R_WRONG_CONTENT_TYPE), "wrong content type"},
76e1051a39Sopenharmony_ci    {0, NULL}
77e1051a39Sopenharmony_ci};
78e1051a39Sopenharmony_ci
79e1051a39Sopenharmony_ci# endif
80e1051a39Sopenharmony_ci
81e1051a39Sopenharmony_ciint ossl_err_load_TS_strings(void)
82e1051a39Sopenharmony_ci{
83e1051a39Sopenharmony_ci# ifndef OPENSSL_NO_ERR
84e1051a39Sopenharmony_ci    if (ERR_reason_error_string(TS_str_reasons[0].error) == NULL)
85e1051a39Sopenharmony_ci        ERR_load_strings_const(TS_str_reasons);
86e1051a39Sopenharmony_ci# endif
87e1051a39Sopenharmony_ci    return 1;
88e1051a39Sopenharmony_ci}
89e1051a39Sopenharmony_ci#else
90e1051a39Sopenharmony_ciNON_EMPTY_TRANSLATION_UNIT
91e1051a39Sopenharmony_ci#endif
92