]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/pem/pem_err.c
PROV: Add type specific MSBLOB and PVK decoding for the MS->key decoders
[thirdparty/openssl.git] / crypto / pem / pem_err.c
CommitLineData
b6cff313 1/*
0cd0a820 2 * Generated by util/mkerr.pl DO NOT EDIT
f4e46b81 3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
6d311938 4 *
16742672 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
d02b48c6 9 */
6d311938 10
ec577822 11#include <openssl/err.h>
52df25cf 12#include <openssl/pemerr.h>
14a6c6a4 13#include "crypto/pemerr.h"
d02b48c6 14
cf1b7d96 15#ifndef OPENSSL_NO_ERR
29dc3508 16
52df25cf
RS
17static const ERR_STRING_DATA PEM_str_reasons[] = {
18 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_BASE64_DECODE), "bad base64 decode"},
19 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_DECRYPT), "bad decrypt"},
20 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_END_LINE), "bad end line"},
21 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_IV_CHARS), "bad iv chars"},
22 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_MAGIC_NUMBER), "bad magic number"},
23 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_PASSWORD_READ), "bad password read"},
24 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_VERSION_NUMBER), "bad version number"},
25 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BIO_WRITE_FAILURE), "bio write failure"},
26 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_CIPHER_IS_NULL), "cipher is null"},
27 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_ERROR_CONVERTING_PRIVATE_KEY),
28 "error converting private key"},
f4e46b81
RL
29 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_EXPECTING_DSS_KEY_BLOB),
30 "expecting dss key blob"},
52df25cf
RS
31 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_EXPECTING_PRIVATE_KEY_BLOB),
32 "expecting private key blob"},
33 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_EXPECTING_PUBLIC_KEY_BLOB),
34 "expecting public key blob"},
f4e46b81
RL
35 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_EXPECTING_RSA_KEY_BLOB),
36 "expecting rsa key blob"},
52df25cf
RS
37 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_HEADER_TOO_LONG), "header too long"},
38 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_INCONSISTENT_HEADER),
39 "inconsistent header"},
40 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_KEYBLOB_HEADER_PARSE_ERROR),
41 "keyblob header parse error"},
42 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_KEYBLOB_TOO_SHORT), "keyblob too short"},
43 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_MISSING_DEK_IV), "missing dek iv"},
44 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_NOT_DEK_INFO), "not dek info"},
45 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_NOT_ENCRYPTED), "not encrypted"},
46 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_NOT_PROC_TYPE), "not proc type"},
47 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_NO_START_LINE), "no start line"},
48 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_PROBLEMS_GETTING_PASSWORD),
49 "problems getting password"},
50 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_PVK_DATA_TOO_SHORT), "pvk data too short"},
51 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_PVK_TOO_SHORT), "pvk too short"},
52 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_READ_KEY), "read key"},
53 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_SHORT_HEADER), "short header"},
54 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_UNEXPECTED_DEK_IV), "unexpected dek iv"},
55 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_UNSUPPORTED_CIPHER), "unsupported cipher"},
56 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_UNSUPPORTED_ENCRYPTION),
57 "unsupported encryption"},
58 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_UNSUPPORTED_KEY_COMPONENTS),
59 "unsupported key components"},
87d91d22
RL
60 {ERR_PACK(ERR_LIB_PEM, 0, PEM_R_UNSUPPORTED_PUBLIC_KEY_TYPE),
61 "unsupported public key type"},
0f113f3e
MC
62 {0, NULL}
63};
d02b48c6 64
58964a49
RE
65#endif
66
14a6c6a4 67int err_load_PEM_strings_int(void)
0f113f3e 68{
47a9d527 69#ifndef OPENSSL_NO_ERR
0cd1b144 70 if (ERR_reason_error_string(PEM_str_reasons[0].error) == NULL)
52df25cf 71 ERR_load_strings_const(PEM_str_reasons);
47a9d527 72#endif
69588edb 73 return 1;
0f113f3e 74}