/src/openssl30/crypto/engine/eng_err.c
Line | Count | Source |
1 | | /* |
2 | | * Generated by util/mkerr.pl DO NOT EDIT |
3 | | * Copyright 1995-2021 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/engineerr.h> |
13 | | #include "crypto/engineerr.h" |
14 | | |
15 | | #ifndef OPENSSL_NO_ENGINE |
16 | | |
17 | | # ifndef OPENSSL_NO_ERR |
18 | | |
19 | | static const ERR_STRING_DATA ENGINE_str_reasons[] = { |
20 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_ALREADY_LOADED), "already loaded"}, |
21 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_ARGUMENT_IS_NOT_A_NUMBER), |
22 | | "argument is not a number"}, |
23 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_CMD_NOT_EXECUTABLE), |
24 | | "cmd not executable"}, |
25 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_COMMAND_TAKES_INPUT), |
26 | | "command takes input"}, |
27 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_COMMAND_TAKES_NO_INPUT), |
28 | | "command takes no input"}, |
29 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_CONFLICTING_ENGINE_ID), |
30 | | "conflicting engine id"}, |
31 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED), |
32 | | "ctrl command not implemented"}, |
33 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_DSO_FAILURE), "DSO failure"}, |
34 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_DSO_NOT_FOUND), "dso not found"}, |
35 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_ENGINES_SECTION_ERROR), |
36 | | "engines section error"}, |
37 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_ENGINE_CONFIGURATION_ERROR), |
38 | | "engine configuration error"}, |
39 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_ENGINE_IS_NOT_IN_LIST), |
40 | | "engine is not in the list"}, |
41 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_ENGINE_SECTION_ERROR), |
42 | | "engine section error"}, |
43 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_FAILED_LOADING_PRIVATE_KEY), |
44 | | "failed loading private key"}, |
45 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_FAILED_LOADING_PUBLIC_KEY), |
46 | | "failed loading public key"}, |
47 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_FINISH_FAILED), "finish failed"}, |
48 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_ID_OR_NAME_MISSING), |
49 | | "'id' or 'name' missing"}, |
50 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_INIT_FAILED), "init failed"}, |
51 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_INTERNAL_LIST_ERROR), |
52 | | "internal list error"}, |
53 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_INVALID_ARGUMENT), |
54 | | "invalid argument"}, |
55 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_INVALID_CMD_NAME), |
56 | | "invalid cmd name"}, |
57 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_INVALID_CMD_NUMBER), |
58 | | "invalid cmd number"}, |
59 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_INVALID_INIT_VALUE), |
60 | | "invalid init value"}, |
61 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_INVALID_STRING), "invalid string"}, |
62 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_NOT_INITIALISED), "not initialised"}, |
63 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_NOT_LOADED), "not loaded"}, |
64 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_NO_CONTROL_FUNCTION), |
65 | | "no control function"}, |
66 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_NO_INDEX), "no index"}, |
67 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_NO_LOAD_FUNCTION), |
68 | | "no load function"}, |
69 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_NO_REFERENCE), "no reference"}, |
70 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_NO_SUCH_ENGINE), "no such engine"}, |
71 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_UNIMPLEMENTED_CIPHER), |
72 | | "unimplemented cipher"}, |
73 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_UNIMPLEMENTED_DIGEST), |
74 | | "unimplemented digest"}, |
75 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_UNIMPLEMENTED_PUBLIC_KEY_METHOD), |
76 | | "unimplemented public key method"}, |
77 | | {ERR_PACK(ERR_LIB_ENGINE, 0, ENGINE_R_VERSION_INCOMPATIBILITY), |
78 | | "version incompatibility"}, |
79 | | {0, NULL} |
80 | | }; |
81 | | |
82 | | # endif |
83 | | |
84 | | int ossl_err_load_ENGINE_strings(void) |
85 | 133 | { |
86 | 133 | # ifndef OPENSSL_NO_ERR |
87 | 133 | if (ERR_reason_error_string(ENGINE_str_reasons[0].error) == NULL) |
88 | 133 | ERR_load_strings_const(ENGINE_str_reasons); |
89 | 133 | # endif |
90 | 133 | return 1; |
91 | 133 | } |
92 | | #else |
93 | | NON_EMPTY_TRANSLATION_UNIT |
94 | | #endif |