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/pkcs7err.h>
13e1051a39Sopenharmony_ci#include "crypto/pkcs7err.h"
14e1051a39Sopenharmony_ci
15e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_ERR
16e1051a39Sopenharmony_ci
17e1051a39Sopenharmony_cistatic const ERR_STRING_DATA PKCS7_str_reasons[] = {
18e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_CERTIFICATE_VERIFY_ERROR),
19e1051a39Sopenharmony_ci    "certificate verify error"},
20e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER),
21e1051a39Sopenharmony_ci    "cipher has no object identifier"},
22e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_CIPHER_NOT_INITIALIZED),
23e1051a39Sopenharmony_ci    "cipher not initialized"},
24e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_CONTENT_AND_DATA_PRESENT),
25e1051a39Sopenharmony_ci    "content and data present"},
26e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_CTRL_ERROR), "ctrl error"},
27e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_DECRYPT_ERROR), "decrypt error"},
28e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_DIGEST_FAILURE), "digest failure"},
29e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_ENCRYPTION_CTRL_FAILURE),
30e1051a39Sopenharmony_ci    "encryption ctrl failure"},
31e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE),
32e1051a39Sopenharmony_ci    "encryption not supported for this key type"},
33e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_ERROR_ADDING_RECIPIENT),
34e1051a39Sopenharmony_ci    "error adding recipient"},
35e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_ERROR_SETTING_CIPHER),
36e1051a39Sopenharmony_ci    "error setting cipher"},
37e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_INVALID_NULL_POINTER),
38e1051a39Sopenharmony_ci    "invalid null pointer"},
39e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_INVALID_SIGNED_DATA_TYPE),
40e1051a39Sopenharmony_ci    "invalid signed data type"},
41e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_NO_CONTENT), "no content"},
42e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_NO_DEFAULT_DIGEST),
43e1051a39Sopenharmony_ci    "no default digest"},
44e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_NO_MATCHING_DIGEST_TYPE_FOUND),
45e1051a39Sopenharmony_ci    "no matching digest type found"},
46e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE),
47e1051a39Sopenharmony_ci    "no recipient matches certificate"},
48e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_NO_SIGNATURES_ON_DATA),
49e1051a39Sopenharmony_ci    "no signatures on data"},
50e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_NO_SIGNERS), "no signers"},
51e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE),
52e1051a39Sopenharmony_ci    "operation not supported on this type"},
53e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR),
54e1051a39Sopenharmony_ci    "pkcs7 add signature error"},
55e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_PKCS7_ADD_SIGNER_ERROR),
56e1051a39Sopenharmony_ci    "pkcs7 add signer error"},
57e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_PKCS7_DATASIGN), "pkcs7 datasign"},
58e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE),
59e1051a39Sopenharmony_ci    "private key does not match certificate"},
60e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_SIGNATURE_FAILURE),
61e1051a39Sopenharmony_ci    "signature failure"},
62e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND),
63e1051a39Sopenharmony_ci    "signer certificate not found"},
64e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_SIGNING_CTRL_FAILURE),
65e1051a39Sopenharmony_ci    "signing ctrl failure"},
66e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE),
67e1051a39Sopenharmony_ci    "signing not supported for this key type"},
68e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_SMIME_TEXT_ERROR), "smime text error"},
69e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_UNABLE_TO_FIND_CERTIFICATE),
70e1051a39Sopenharmony_ci    "unable to find certificate"},
71e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_UNABLE_TO_FIND_MEM_BIO),
72e1051a39Sopenharmony_ci    "unable to find mem bio"},
73e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST),
74e1051a39Sopenharmony_ci    "unable to find message digest"},
75e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_UNKNOWN_DIGEST_TYPE),
76e1051a39Sopenharmony_ci    "unknown digest type"},
77e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_UNKNOWN_OPERATION),
78e1051a39Sopenharmony_ci    "unknown operation"},
79e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_UNSUPPORTED_CIPHER_TYPE),
80e1051a39Sopenharmony_ci    "unsupported cipher type"},
81e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_UNSUPPORTED_CONTENT_TYPE),
82e1051a39Sopenharmony_ci    "unsupported content type"},
83e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_WRONG_CONTENT_TYPE),
84e1051a39Sopenharmony_ci    "wrong content type"},
85e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PKCS7, 0, PKCS7_R_WRONG_PKCS7_TYPE), "wrong pkcs7 type"},
86e1051a39Sopenharmony_ci    {0, NULL}
87e1051a39Sopenharmony_ci};
88e1051a39Sopenharmony_ci
89e1051a39Sopenharmony_ci#endif
90e1051a39Sopenharmony_ci
91e1051a39Sopenharmony_ciint ossl_err_load_PKCS7_strings(void)
92e1051a39Sopenharmony_ci{
93e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_ERR
94e1051a39Sopenharmony_ci    if (ERR_reason_error_string(PKCS7_str_reasons[0].error) == NULL)
95e1051a39Sopenharmony_ci        ERR_load_strings_const(PKCS7_str_reasons);
96e1051a39Sopenharmony_ci#endif
97e1051a39Sopenharmony_ci    return 1;
98e1051a39Sopenharmony_ci}
99