2 * Generated by util/mkerr.pl DO NOT EDIT
3 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
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
11 #include <openssl/err.h>
12 #include "e_gost_err.h"
14 #ifndef OPENSSL_NO_ERR
16 static ERR_STRING_DATA GOST_str_reasons[] = {
17 {ERR_PACK(0, 0, GOST_R_BAD_KEY_PARAMETERS_FORMAT),
18 "bad key parameters format"},
19 {ERR_PACK(0, 0, GOST_R_BAD_MAC), "bad mac"},
20 {ERR_PACK(0, 0, GOST_R_BAD_ORDER), "bad order"},
21 {ERR_PACK(0, 0, GOST_R_BAD_PKEY_PARAMETERS_FORMAT),
22 "bad pkey parameters format"},
23 {ERR_PACK(0, 0, GOST_R_CANNOT_PACK_EPHEMERAL_KEY),
24 "cannot pack ephemeral key"},
25 {ERR_PACK(0, 0, GOST_R_CANNOT_UNPACK_EPHEMERAL_KEY),
26 "cannot unpack ephemeral key"},
27 {ERR_PACK(0, 0, GOST_R_CIPHER_NOT_FOUND), "cipher not found"},
28 {ERR_PACK(0, 0, GOST_R_CTRL_CALL_FAILED), "ctrl call failed"},
29 {ERR_PACK(0, 0, GOST_R_ERROR_COMPUTING_EXPORT_KEYS),
30 "error computing export keys"},
31 {ERR_PACK(0, 0, GOST_R_ERROR_COMPUTING_SHARED_KEY),
32 "error computing shared key"},
33 {ERR_PACK(0, 0, GOST_R_ERROR_PARSING_KEY_TRANSPORT_INFO),
34 "error parsing key transport info"},
35 {ERR_PACK(0, 0, GOST_R_ERROR_POINT_MUL), "error point mul"},
36 {ERR_PACK(0, 0, GOST_R_INCOMPATIBLE_ALGORITHMS), "incompatible algorithms"},
37 {ERR_PACK(0, 0, GOST_R_INCOMPATIBLE_PEER_KEY), "incompatible peer key"},
38 {ERR_PACK(0, 0, GOST_R_INVALID_CIPHER), "invalid cipher"},
39 {ERR_PACK(0, 0, GOST_R_INVALID_CIPHER_PARAMS), "invalid cipher params"},
40 {ERR_PACK(0, 0, GOST_R_INVALID_CIPHER_PARAM_OID),
41 "invalid cipher param oid"},
42 {ERR_PACK(0, 0, GOST_R_INVALID_DIGEST_TYPE), "invalid digest type"},
43 {ERR_PACK(0, 0, GOST_R_INVALID_IV_LENGTH), "invalid iv length"},
44 {ERR_PACK(0, 0, GOST_R_INVALID_MAC_KEY_LENGTH), "invalid mac key length"},
45 {ERR_PACK(0, 0, GOST_R_INVALID_MAC_KEY_SIZE), "invalid mac key size"},
46 {ERR_PACK(0, 0, GOST_R_INVALID_MAC_PARAMS), "invalid mac params"},
47 {ERR_PACK(0, 0, GOST_R_INVALID_MAC_SIZE), "invalid mac size"},
48 {ERR_PACK(0, 0, GOST_R_INVALID_PARAMSET), "invalid paramset"},
49 {ERR_PACK(0, 0, GOST_R_KEY_IS_NOT_INITIALIZED), "key is not initialized"},
50 {ERR_PACK(0, 0, GOST_R_KEY_PARAMETERS_MISSING), "key parameters missing"},
51 {ERR_PACK(0, 0, GOST_R_MAC_KEY_NOT_SET), "mac key not set"},
52 {ERR_PACK(0, 0, GOST_R_NO_PARAMETERS_SET), "no parameters set"},
53 {ERR_PACK(0, 0, GOST_R_NO_PEER_KEY), "no peer key"},
54 {ERR_PACK(0, 0, GOST_R_NO_PRIVATE_PART_OF_NON_EPHEMERAL_KEYPAIR),
55 "no private part of non ephemeral keypair"},
56 {ERR_PACK(0, 0, GOST_R_PUBLIC_KEY_UNDEFINED), "public key undefined"},
57 {ERR_PACK(0, 0, GOST_R_RNG_ERROR), "rng error"},
58 {ERR_PACK(0, 0, GOST_R_SIGNATURE_MISMATCH), "signature mismatch"},
59 {ERR_PACK(0, 0, GOST_R_SIGNATURE_PARTS_GREATER_THAN_Q),
60 "signature parts greater than q"},
61 {ERR_PACK(0, 0, GOST_R_UKM_NOT_SET), "ukm not set"},
62 {ERR_PACK(0, 0, GOST_R_UNSUPPORTED_CIPHER_CTL_COMMAND),
63 "unsupported cipher ctl command"},
64 {ERR_PACK(0, 0, GOST_R_UNSUPPORTED_PARAMETER_SET),
65 "unsupported parameter set"},
71 static int lib_code = 0;
72 static int error_loaded = 0;
74 int ERR_load_GOST_strings(void)
77 lib_code = ERR_get_next_error_library();
80 #ifndef OPENSSL_NO_ERR
81 ERR_load_strings(lib_code, GOST_str_reasons);
88 void ERR_unload_GOST_strings(void)
91 #ifndef OPENSSL_NO_ERR
92 ERR_unload_strings(lib_code, GOST_str_reasons);
98 void ERR_GOST_error(int function, int reason, char *file, int line)
101 lib_code = ERR_get_next_error_library();
102 ERR_raise(lib_code, reason);
103 ERR_set_debug(file, line, NULL);