xref: /third_party/openssl/crypto/pem/pem_err.c (revision e1051a39)
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/pemerr.h>
13e1051a39Sopenharmony_ci#include "crypto/pemerr.h"
14e1051a39Sopenharmony_ci
15e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_ERR
16e1051a39Sopenharmony_ci
17e1051a39Sopenharmony_cistatic const ERR_STRING_DATA PEM_str_reasons[] = {
18e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_BASE64_DECODE), "bad base64 decode"},
19e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_DECRYPT), "bad decrypt"},
20e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_END_LINE), "bad end line"},
21e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_IV_CHARS), "bad iv chars"},
22e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_MAGIC_NUMBER), "bad magic number"},
23e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_PASSWORD_READ), "bad password read"},
24e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_VERSION_NUMBER), "bad version number"},
25e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BIO_WRITE_FAILURE), "bio write failure"},
26e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_CIPHER_IS_NULL), "cipher is null"},
27e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_ERROR_CONVERTING_PRIVATE_KEY),
28e1051a39Sopenharmony_ci    "error converting private key"},
29e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_EXPECTING_DSS_KEY_BLOB),
30e1051a39Sopenharmony_ci    "expecting dss key blob"},
31e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_EXPECTING_PRIVATE_KEY_BLOB),
32e1051a39Sopenharmony_ci    "expecting private key blob"},
33e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_EXPECTING_PUBLIC_KEY_BLOB),
34e1051a39Sopenharmony_ci    "expecting public key blob"},
35e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_EXPECTING_RSA_KEY_BLOB),
36e1051a39Sopenharmony_ci    "expecting rsa key blob"},
37e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_HEADER_TOO_LONG), "header too long"},
38e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_INCONSISTENT_HEADER),
39e1051a39Sopenharmony_ci    "inconsistent header"},
40e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_KEYBLOB_HEADER_PARSE_ERROR),
41e1051a39Sopenharmony_ci    "keyblob header parse error"},
42e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_KEYBLOB_TOO_SHORT), "keyblob too short"},
43e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_MISSING_DEK_IV), "missing dek iv"},
44e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_NOT_DEK_INFO), "not dek info"},
45e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_NOT_ENCRYPTED), "not encrypted"},
46e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_NOT_PROC_TYPE), "not proc type"},
47e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_NO_START_LINE), "no start line"},
48e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_PROBLEMS_GETTING_PASSWORD),
49e1051a39Sopenharmony_ci    "problems getting password"},
50e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_PVK_DATA_TOO_SHORT), "pvk data too short"},
51e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_PVK_TOO_SHORT), "pvk too short"},
52e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_READ_KEY), "read key"},
53e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_SHORT_HEADER), "short header"},
54e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_UNEXPECTED_DEK_IV), "unexpected dek iv"},
55e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_UNSUPPORTED_CIPHER), "unsupported cipher"},
56e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_UNSUPPORTED_ENCRYPTION),
57e1051a39Sopenharmony_ci    "unsupported encryption"},
58e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_UNSUPPORTED_KEY_COMPONENTS),
59e1051a39Sopenharmony_ci    "unsupported key components"},
60e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_UNSUPPORTED_PUBLIC_KEY_TYPE),
61e1051a39Sopenharmony_ci    "unsupported public key type"},
62e1051a39Sopenharmony_ci    {0, NULL}
63e1051a39Sopenharmony_ci};
64e1051a39Sopenharmony_ci
65e1051a39Sopenharmony_ci#endif
66e1051a39Sopenharmony_ci
67e1051a39Sopenharmony_ciint ossl_err_load_PEM_strings(void)
68e1051a39Sopenharmony_ci{
69e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_ERR
70e1051a39Sopenharmony_ci    if (ERR_reason_error_string(PEM_str_reasons[0].error) == NULL)
71e1051a39Sopenharmony_ci        ERR_load_strings_const(PEM_str_reasons);
72e1051a39Sopenharmony_ci#endif
73e1051a39Sopenharmony_ci    return 1;
74e1051a39Sopenharmony_ci}
75