| 1 | /* |
| 2 | * Generated by util/mkerr.pl DO NOT EDIT |
| 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. |
| 4 | * |
| 5 | * Licensed under the Apache License 2.0 (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_reasons[] = { |
| 17 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_BAD_PKCS7_TYPE), "bad pkcs7 type" }, |
| 18 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_BAD_TYPE), "bad type" }, |
| 19 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_CANNOT_LOAD_CERT), "cannot load certificate" }, |
| 20 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_CANNOT_LOAD_KEY), "cannot load private key" }, |
| 21 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_CERTIFICATE_VERIFY_ERROR), |
| 22 | "certificate verify error" }, |
| 23 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_COULD_NOT_SET_ENGINE), |
| 24 | "could not set engine" }, |
| 25 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_COULD_NOT_SET_TIME), "could not set time" }, |
| 26 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_DETACHED_CONTENT), "detached content" }, |
| 27 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_ESS_ADD_SIGNING_CERT_ERROR), |
| 28 | "ess add signing cert error" }, |
| 29 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_ESS_ADD_SIGNING_CERT_V2_ERROR), |
| 30 | "ess add signing cert v2 error" }, |
| 31 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_ESS_SIGNING_CERTIFICATE_ERROR), |
| 32 | "ess signing certificate error" }, |
| 33 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_INVALID_NULL_POINTER), |
| 34 | "invalid null pointer" }, |
| 35 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_INVALID_SIGNER_CERTIFICATE_PURPOSE), |
| 36 | "invalid signer certificate purpose" }, |
| 37 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_MESSAGE_IMPRINT_MISMATCH), |
| 38 | "message imprint mismatch" }, |
| 39 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_NONCE_MISMATCH), "nonce mismatch" }, |
| 40 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_NONCE_NOT_RETURNED), "nonce not returned" }, |
| 41 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_NO_CONTENT), "no content" }, |
| 42 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_NO_TIME_STAMP_TOKEN), "no time stamp token" }, |
| 43 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_PKCS7_ADD_SIGNATURE_ERROR), |
| 44 | "pkcs7 add signature error" }, |
| 45 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_PKCS7_ADD_SIGNED_ATTR_ERROR), |
| 46 | "pkcs7 add signed attr error" }, |
| 47 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_PKCS7_TO_TS_TST_INFO_FAILED), |
| 48 | "pkcs7 to ts tst info failed" }, |
| 49 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_POLICY_MISMATCH), "policy mismatch" }, |
| 50 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE), |
| 51 | "private key does not match certificate" }, |
| 52 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_RESPONSE_SETUP_ERROR), |
| 53 | "response setup error" }, |
| 54 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_SIGNATURE_FAILURE), "signature failure" }, |
| 55 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_THERE_MUST_BE_ONE_SIGNER), |
| 56 | "there must be one signer" }, |
| 57 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_TIME_SYSCALL_ERROR), "time syscall error" }, |
| 58 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_TOKEN_NOT_PRESENT), "token not present" }, |
| 59 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_TOKEN_PRESENT), "token present" }, |
| 60 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_TSA_NAME_MISMATCH), "tsa name mismatch" }, |
| 61 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_TSA_UNTRUSTED), "tsa untrusted" }, |
| 62 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_TST_INFO_SETUP_ERROR), |
| 63 | "tst info setup error" }, |
| 64 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_TS_DATASIGN), "ts datasign" }, |
| 65 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_UNACCEPTABLE_POLICY), "unacceptable policy" }, |
| 66 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_UNSUPPORTED_MD_ALGORITHM), |
| 67 | "unsupported md algorithm" }, |
| 68 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_UNSUPPORTED_VERSION), "unsupported version" }, |
| 69 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_VAR_BAD_VALUE), "var bad value" }, |
| 70 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_VAR_LOOKUP_FAILURE), |
| 71 | "cannot find config variable" }, |
| 72 | {ERR_PACK(ERR_LIB_TS, 0, TS_R_WRONG_CONTENT_TYPE), "wrong content type" }, |
| 73 | {0, NULL} |
| 74 | }; |
| 75 | |
| 76 | #endif |
| 77 | |
| 78 | int ERR_load_TS_strings(void) |
| 79 | { |
| 80 | #ifndef OPENSSL_NO_ERR |
| 81 | if (ERR_reason_error_string(TS_str_reasons[0].error) == NULL) |
| 82 | ERR_load_strings_const(TS_str_reasons); |
| 83 | #endif |
| 84 | return 1; |
| 85 | } |
| 86 | |