/src/openssl/crypto/pkcs12/pk12err.c
Line | Count | Source |
1 | | /* |
2 | | * Generated by util/mkerr.pl DO NOT EDIT |
3 | | * Copyright 1995-2025 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/pkcs12err.h> |
13 | | #include "crypto/pkcs12err.h" |
14 | | |
15 | | #ifndef OPENSSL_NO_ERR |
16 | | |
17 | | static const ERR_STRING_DATA PKCS12_str_reasons[] = { |
18 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_CALLBACK_FAILED), "callback failed" }, |
19 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_CANT_PACK_STRUCTURE), |
20 | | "can't pack structure" }, |
21 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_CONTENT_TYPE_NOT_DATA), |
22 | | "content type not data" }, |
23 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_DECODE_ERROR), "decode error" }, |
24 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_ENCODE_ERROR), "encode error" }, |
25 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_ENCRYPT_ERROR), "encrypt error" }, |
26 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_ERROR_SETTING_ENCRYPTED_DATA_TYPE), |
27 | | "error setting encrypted data type" }, |
28 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_INVALID_NULL_ARGUMENT), |
29 | | "invalid null argument" }, |
30 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_INVALID_NULL_PKCS12_POINTER), |
31 | | "invalid null pkcs12 pointer" }, |
32 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_INVALID_SALT_LENGTH), |
33 | | "invalid salt length" }, |
34 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_INVALID_TYPE), "invalid type" }, |
35 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_IV_GEN_ERROR), "iv gen error" }, |
36 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_KEY_GEN_ERROR), "key gen error" }, |
37 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_MAC_ABSENT), "mac absent" }, |
38 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_MAC_GENERATION_ERROR), |
39 | | "mac generation error" }, |
40 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_MAC_SETUP_ERROR), "mac setup error" }, |
41 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_MAC_STRING_SET_ERROR), |
42 | | "mac string set error" }, |
43 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_MAC_VERIFY_FAILURE), |
44 | | "mac verify failure" }, |
45 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_PARSE_ERROR), "parse error" }, |
46 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_PKCS12_CIPHERFINAL_ERROR), |
47 | | "pkcs12 cipherfinal error" }, |
48 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_UNKNOWN_DIGEST_ALGORITHM), |
49 | | "unknown digest algorithm" }, |
50 | | { ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_UNSUPPORTED_PKCS12_MODE), |
51 | | "unsupported pkcs12 mode" }, |
52 | | { 0, NULL } |
53 | | }; |
54 | | |
55 | | #endif |
56 | | |
57 | | int ossl_err_load_PKCS12_strings(void) |
58 | 3 | { |
59 | 3 | #ifndef OPENSSL_NO_ERR |
60 | 3 | if (ERR_reason_error_string(PKCS12_str_reasons[0].error) == NULL) |
61 | 3 | ERR_load_strings_const(PKCS12_str_reasons); |
62 | 3 | #endif |
63 | 3 | return 1; |
64 | 3 | } |