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