]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/ts/ts_err.c
crypto/cms: Add support for CAdES Basic Electronic Signatures (CAdES-BES)
[thirdparty/openssl.git] / crypto / ts / ts_err.c
CommitLineData
b6cff313 1/*
0cd0a820 2 * Generated by util/mkerr.pl DO NOT EDIT
e85d19c6 3 * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
c7235be6 4 *
a1b4409d 5 * Licensed under the Apache License 2.0 (the "License"). You may not use
b6cff313
RS
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
c7235be6
UM
9 */
10
c7235be6 11#include <openssl/err.h>
52df25cf 12#include <openssl/tserr.h>
c7235be6 13
c7235be6 14#ifndef OPENSSL_NO_ERR
47a9d527 15
52df25cf
RS
16static const ERR_STRING_DATA TS_str_functs[] = {
17 {ERR_PACK(ERR_LIB_TS, TS_F_DEF_SERIAL_CB, 0), "def_serial_cb"},
18 {ERR_PACK(ERR_LIB_TS, TS_F_DEF_TIME_CB, 0), "def_time_cb"},
52df25cf
RS
19 {ERR_PACK(ERR_LIB_TS, TS_F_INT_TS_RESP_VERIFY_TOKEN, 0),
20 "int_ts_RESP_verify_token"},
21 {ERR_PACK(ERR_LIB_TS, TS_F_PKCS7_TO_TS_TST_INFO, 0),
22 "PKCS7_to_TS_TST_INFO"},
23 {ERR_PACK(ERR_LIB_TS, TS_F_TS_ACCURACY_SET_MICROS, 0),
24 "TS_ACCURACY_set_micros"},
25 {ERR_PACK(ERR_LIB_TS, TS_F_TS_ACCURACY_SET_MILLIS, 0),
26 "TS_ACCURACY_set_millis"},
27 {ERR_PACK(ERR_LIB_TS, TS_F_TS_ACCURACY_SET_SECONDS, 0),
28 "TS_ACCURACY_set_seconds"},
29 {ERR_PACK(ERR_LIB_TS, TS_F_TS_CHECK_IMPRINTS, 0), "ts_check_imprints"},
30 {ERR_PACK(ERR_LIB_TS, TS_F_TS_CHECK_NONCES, 0), "ts_check_nonces"},
31 {ERR_PACK(ERR_LIB_TS, TS_F_TS_CHECK_POLICY, 0), "ts_check_policy"},
32 {ERR_PACK(ERR_LIB_TS, TS_F_TS_CHECK_SIGNING_CERTS, 0),
33 "ts_check_signing_certs"},
34 {ERR_PACK(ERR_LIB_TS, TS_F_TS_CHECK_STATUS_INFO, 0),
35 "ts_check_status_info"},
36 {ERR_PACK(ERR_LIB_TS, TS_F_TS_COMPUTE_IMPRINT, 0), "ts_compute_imprint"},
37 {ERR_PACK(ERR_LIB_TS, TS_F_TS_CONF_INVALID, 0), "ts_CONF_invalid"},
38 {ERR_PACK(ERR_LIB_TS, TS_F_TS_CONF_LOAD_CERT, 0), "TS_CONF_load_cert"},
39 {ERR_PACK(ERR_LIB_TS, TS_F_TS_CONF_LOAD_CERTS, 0), "TS_CONF_load_certs"},
40 {ERR_PACK(ERR_LIB_TS, TS_F_TS_CONF_LOAD_KEY, 0), "TS_CONF_load_key"},
41 {ERR_PACK(ERR_LIB_TS, TS_F_TS_CONF_LOOKUP_FAIL, 0), "ts_CONF_lookup_fail"},
42 {ERR_PACK(ERR_LIB_TS, TS_F_TS_CONF_SET_DEFAULT_ENGINE, 0),
43 "TS_CONF_set_default_engine"},
44 {ERR_PACK(ERR_LIB_TS, TS_F_TS_GET_STATUS_TEXT, 0), "ts_get_status_text"},
45 {ERR_PACK(ERR_LIB_TS, TS_F_TS_MSG_IMPRINT_SET_ALGO, 0),
46 "TS_MSG_IMPRINT_set_algo"},
47 {ERR_PACK(ERR_LIB_TS, TS_F_TS_REQ_SET_MSG_IMPRINT, 0),
48 "TS_REQ_set_msg_imprint"},
49 {ERR_PACK(ERR_LIB_TS, TS_F_TS_REQ_SET_NONCE, 0), "TS_REQ_set_nonce"},
50 {ERR_PACK(ERR_LIB_TS, TS_F_TS_REQ_SET_POLICY_ID, 0),
51 "TS_REQ_set_policy_id"},
52 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_CREATE_RESPONSE, 0),
53 "TS_RESP_create_response"},
54 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_CREATE_TST_INFO, 0),
55 "ts_RESP_create_tst_info"},
56 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_CTX_ADD_FAILURE_INFO, 0),
0f113f3e 57 "TS_RESP_CTX_add_failure_info"},
52df25cf
RS
58 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_CTX_ADD_MD, 0), "TS_RESP_CTX_add_md"},
59 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_CTX_ADD_POLICY, 0),
60 "TS_RESP_CTX_add_policy"},
61 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_CTX_NEW, 0), "TS_RESP_CTX_new"},
62 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_CTX_SET_ACCURACY, 0),
63 "TS_RESP_CTX_set_accuracy"},
64 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_CTX_SET_CERTS, 0),
65 "TS_RESP_CTX_set_certs"},
66 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_CTX_SET_DEF_POLICY, 0),
67 "TS_RESP_CTX_set_def_policy"},
68 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_CTX_SET_SIGNER_CERT, 0),
0f113f3e 69 "TS_RESP_CTX_set_signer_cert"},
52df25cf 70 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_CTX_SET_STATUS_INFO, 0),
0f113f3e 71 "TS_RESP_CTX_set_status_info"},
52df25cf
RS
72 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_GET_POLICY, 0), "ts_RESP_get_policy"},
73 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_SET_GENTIME_WITH_PRECISION, 0),
b8fb5989 74 "TS_RESP_set_genTime_with_precision"},
52df25cf
RS
75 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_SET_STATUS_INFO, 0),
76 "TS_RESP_set_status_info"},
77 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_SET_TST_INFO, 0),
78 "TS_RESP_set_tst_info"},
79 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_SIGN, 0), "ts_RESP_sign"},
80 {ERR_PACK(ERR_LIB_TS, TS_F_TS_RESP_VERIFY_SIGNATURE, 0),
81 "TS_RESP_verify_signature"},
82 {ERR_PACK(ERR_LIB_TS, TS_F_TS_TST_INFO_SET_ACCURACY, 0),
83 "TS_TST_INFO_set_accuracy"},
84 {ERR_PACK(ERR_LIB_TS, TS_F_TS_TST_INFO_SET_MSG_IMPRINT, 0),
0f113f3e 85 "TS_TST_INFO_set_msg_imprint"},
52df25cf
RS
86 {ERR_PACK(ERR_LIB_TS, TS_F_TS_TST_INFO_SET_NONCE, 0),
87 "TS_TST_INFO_set_nonce"},
88 {ERR_PACK(ERR_LIB_TS, TS_F_TS_TST_INFO_SET_POLICY_ID, 0),
89 "TS_TST_INFO_set_policy_id"},
90 {ERR_PACK(ERR_LIB_TS, TS_F_TS_TST_INFO_SET_SERIAL, 0),
91 "TS_TST_INFO_set_serial"},
92 {ERR_PACK(ERR_LIB_TS, TS_F_TS_TST_INFO_SET_TIME, 0),
93 "TS_TST_INFO_set_time"},
94 {ERR_PACK(ERR_LIB_TS, TS_F_TS_TST_INFO_SET_TSA, 0), "TS_TST_INFO_set_tsa"},
5816586b 95 {ERR_PACK(ERR_LIB_TS, TS_F_TS_VERIFY, 0), ""},
52df25cf
RS
96 {ERR_PACK(ERR_LIB_TS, TS_F_TS_VERIFY_CERT, 0), "ts_verify_cert"},
97 {ERR_PACK(ERR_LIB_TS, TS_F_TS_VERIFY_CTX_NEW, 0), "TS_VERIFY_CTX_new"},
0f113f3e
MC
98 {0, NULL}
99};
c7235be6 100
52df25cf
RS
101static const ERR_STRING_DATA TS_str_reasons[] = {
102 {ERR_PACK(ERR_LIB_TS, 0, TS_R_BAD_PKCS7_TYPE), "bad pkcs7 type"},
103 {ERR_PACK(ERR_LIB_TS, 0, TS_R_BAD_TYPE), "bad type"},
104 {ERR_PACK(ERR_LIB_TS, 0, TS_R_CANNOT_LOAD_CERT), "cannot load certificate"},
105 {ERR_PACK(ERR_LIB_TS, 0, TS_R_CANNOT_LOAD_KEY), "cannot load private key"},
106 {ERR_PACK(ERR_LIB_TS, 0, TS_R_CERTIFICATE_VERIFY_ERROR),
107 "certificate verify error"},
108 {ERR_PACK(ERR_LIB_TS, 0, TS_R_COULD_NOT_SET_ENGINE),
109 "could not set engine"},
110 {ERR_PACK(ERR_LIB_TS, 0, TS_R_COULD_NOT_SET_TIME), "could not set time"},
111 {ERR_PACK(ERR_LIB_TS, 0, TS_R_DETACHED_CONTENT), "detached content"},
112 {ERR_PACK(ERR_LIB_TS, 0, TS_R_ESS_ADD_SIGNING_CERT_ERROR),
113 "ess add signing cert error"},
114 {ERR_PACK(ERR_LIB_TS, 0, TS_R_ESS_ADD_SIGNING_CERT_V2_ERROR),
115 "ess add signing cert v2 error"},
116 {ERR_PACK(ERR_LIB_TS, 0, TS_R_ESS_SIGNING_CERTIFICATE_ERROR),
117 "ess signing certificate error"},
118 {ERR_PACK(ERR_LIB_TS, 0, TS_R_INVALID_NULL_POINTER),
119 "invalid null pointer"},
120 {ERR_PACK(ERR_LIB_TS, 0, TS_R_INVALID_SIGNER_CERTIFICATE_PURPOSE),
121 "invalid signer certificate purpose"},
122 {ERR_PACK(ERR_LIB_TS, 0, TS_R_MESSAGE_IMPRINT_MISMATCH),
123 "message imprint mismatch"},
124 {ERR_PACK(ERR_LIB_TS, 0, TS_R_NONCE_MISMATCH), "nonce mismatch"},
125 {ERR_PACK(ERR_LIB_TS, 0, TS_R_NONCE_NOT_RETURNED), "nonce not returned"},
126 {ERR_PACK(ERR_LIB_TS, 0, TS_R_NO_CONTENT), "no content"},
127 {ERR_PACK(ERR_LIB_TS, 0, TS_R_NO_TIME_STAMP_TOKEN), "no time stamp token"},
128 {ERR_PACK(ERR_LIB_TS, 0, TS_R_PKCS7_ADD_SIGNATURE_ERROR),
129 "pkcs7 add signature error"},
130 {ERR_PACK(ERR_LIB_TS, 0, TS_R_PKCS7_ADD_SIGNED_ATTR_ERROR),
131 "pkcs7 add signed attr error"},
132 {ERR_PACK(ERR_LIB_TS, 0, TS_R_PKCS7_TO_TS_TST_INFO_FAILED),
133 "pkcs7 to ts tst info failed"},
134 {ERR_PACK(ERR_LIB_TS, 0, TS_R_POLICY_MISMATCH), "policy mismatch"},
135 {ERR_PACK(ERR_LIB_TS, 0, TS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE),
136 "private key does not match certificate"},
137 {ERR_PACK(ERR_LIB_TS, 0, TS_R_RESPONSE_SETUP_ERROR),
138 "response setup error"},
139 {ERR_PACK(ERR_LIB_TS, 0, TS_R_SIGNATURE_FAILURE), "signature failure"},
140 {ERR_PACK(ERR_LIB_TS, 0, TS_R_THERE_MUST_BE_ONE_SIGNER),
141 "there must be one signer"},
142 {ERR_PACK(ERR_LIB_TS, 0, TS_R_TIME_SYSCALL_ERROR), "time syscall error"},
143 {ERR_PACK(ERR_LIB_TS, 0, TS_R_TOKEN_NOT_PRESENT), "token not present"},
144 {ERR_PACK(ERR_LIB_TS, 0, TS_R_TOKEN_PRESENT), "token present"},
145 {ERR_PACK(ERR_LIB_TS, 0, TS_R_TSA_NAME_MISMATCH), "tsa name mismatch"},
146 {ERR_PACK(ERR_LIB_TS, 0, TS_R_TSA_UNTRUSTED), "tsa untrusted"},
147 {ERR_PACK(ERR_LIB_TS, 0, TS_R_TST_INFO_SETUP_ERROR),
148 "tst info setup error"},
149 {ERR_PACK(ERR_LIB_TS, 0, TS_R_TS_DATASIGN), "ts datasign"},
150 {ERR_PACK(ERR_LIB_TS, 0, TS_R_UNACCEPTABLE_POLICY), "unacceptable policy"},
151 {ERR_PACK(ERR_LIB_TS, 0, TS_R_UNSUPPORTED_MD_ALGORITHM),
152 "unsupported md algorithm"},
153 {ERR_PACK(ERR_LIB_TS, 0, TS_R_UNSUPPORTED_VERSION), "unsupported version"},
154 {ERR_PACK(ERR_LIB_TS, 0, TS_R_VAR_BAD_VALUE), "var bad value"},
155 {ERR_PACK(ERR_LIB_TS, 0, TS_R_VAR_LOOKUP_FAILURE),
156 "cannot find config variable"},
157 {ERR_PACK(ERR_LIB_TS, 0, TS_R_WRONG_CONTENT_TYPE), "wrong content type"},
0f113f3e
MC
158 {0, NULL}
159};
c7235be6
UM
160
161#endif
162
69588edb 163int ERR_load_TS_strings(void)
0f113f3e 164{
c7235be6 165#ifndef OPENSSL_NO_ERR
0f113f3e 166 if (ERR_func_error_string(TS_str_functs[0].error) == NULL) {
52df25cf
RS
167 ERR_load_strings_const(TS_str_functs);
168 ERR_load_strings_const(TS_str_reasons);
0f113f3e 169 }
47a9d527 170#endif
69588edb 171 return 1;
0f113f3e 172}