summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/gost/gost_err.c64
1 files changed, 30 insertions, 34 deletions
diff --git a/src/lib/libcrypto/gost/gost_err.c b/src/lib/libcrypto/gost/gost_err.c
index 3bf60ff063..e7111dd34b 100644
--- a/src/lib/libcrypto/gost/gost_err.c
+++ b/src/lib/libcrypto/gost/gost_err.c
@@ -73,43 +73,39 @@ static ERR_STRING_DATA GOST_str_functs[]= {
73 {0, NULL} 73 {0, NULL}
74}; 74};
75 75
76static ERR_STRING_DATA GOST_str_reasons[]= 76static ERR_STRING_DATA GOST_str_reasons[] = {
77 { 77 {ERR_REASON(GOST_R_BAD_KEY_PARAMETERS_FORMAT),"bad key parameters format"},
78{ERR_REASON(GOST_R_BAD_KEY_PARAMETERS_FORMAT),"bad key parameters format"}, 78 {ERR_REASON(GOST_R_BAD_PKEY_PARAMETERS_FORMAT),"bad pkey parameters format"},
79{ERR_REASON(GOST_R_BAD_PKEY_PARAMETERS_FORMAT),"bad pkey parameters format"}, 79 {ERR_REASON(GOST_R_CANNOT_PACK_EPHEMERAL_KEY),"cannot pack ephemeral key"},
80{ERR_REASON(GOST_R_CANNOT_PACK_EPHEMERAL_KEY),"cannot pack ephemeral key"}, 80 {ERR_REASON(GOST_R_CTRL_CALL_FAILED) ,"ctrl call failed"},
81{ERR_REASON(GOST_R_CTRL_CALL_FAILED) ,"ctrl call failed"}, 81 {ERR_REASON(GOST_R_ERROR_COMPUTING_SHARED_KEY),"error computing shared key"},
82{ERR_REASON(GOST_R_ERROR_COMPUTING_SHARED_KEY),"error computing shared key"}, 82 {ERR_REASON(GOST_R_ERROR_PARSING_KEY_TRANSPORT_INFO),"error parsing key transport info"},
83{ERR_REASON(GOST_R_ERROR_PARSING_KEY_TRANSPORT_INFO),"error parsing key transport info"}, 83 {ERR_REASON(GOST_R_INCOMPATIBLE_ALGORITHMS),"incompatible algorithms"},
84{ERR_REASON(GOST_R_INCOMPATIBLE_ALGORITHMS),"incompatible algorithms"}, 84 {ERR_REASON(GOST_R_INCOMPATIBLE_PEER_KEY),"incompatible peer key"},
85{ERR_REASON(GOST_R_INCOMPATIBLE_PEER_KEY),"incompatible peer key"}, 85 {ERR_REASON(GOST_R_INVALID_DIGEST_TYPE) ,"invalid digest type"},
86{ERR_REASON(GOST_R_INVALID_DIGEST_TYPE) ,"invalid digest type"}, 86 {ERR_REASON(GOST_R_INVALID_IV_LENGTH) ,"invalid iv length"},
87{ERR_REASON(GOST_R_INVALID_IV_LENGTH) ,"invalid iv length"}, 87 {ERR_REASON(GOST_R_INVALID_MAC_KEY_LENGTH),"invalid mac key length"},
88{ERR_REASON(GOST_R_INVALID_MAC_KEY_LENGTH),"invalid mac key length"}, 88 {ERR_REASON(GOST_R_KEY_IS_NOT_INITIALIZED),"key is not initialized"},
89{ERR_REASON(GOST_R_KEY_IS_NOT_INITIALIZED),"key is not initialized"}, 89 {ERR_REASON(GOST_R_KEY_PARAMETERS_MISSING),"key parameters missing"},
90{ERR_REASON(GOST_R_KEY_PARAMETERS_MISSING),"key parameters missing"}, 90 {ERR_REASON(GOST_R_MAC_KEY_NOT_SET) ,"mac key not set"},
91{ERR_REASON(GOST_R_MAC_KEY_NOT_SET) ,"mac key not set"}, 91 {ERR_REASON(GOST_R_NO_PARAMETERS_SET) ,"no parameters set"},
92{ERR_REASON(GOST_R_NO_PARAMETERS_SET) ,"no parameters set"}, 92 {ERR_REASON(GOST_R_NO_PEER_KEY) ,"no peer key"},
93{ERR_REASON(GOST_R_NO_PEER_KEY) ,"no peer key"}, 93 {ERR_REASON(GOST_R_NO_PRIVATE_PART_OF_NON_EPHEMERAL_KEYPAIR),"no private part of non ephemeral keypair"},
94{ERR_REASON(GOST_R_NO_PRIVATE_PART_OF_NON_EPHEMERAL_KEYPAIR),"no private part of non ephemeral keypair"}, 94 {ERR_REASON(GOST_R_PUBLIC_KEY_UNDEFINED) ,"public key undefined"},
95{ERR_REASON(GOST_R_PUBLIC_KEY_UNDEFINED) ,"public key undefined"}, 95 {ERR_REASON(GOST_R_RANDOM_NUMBER_GENERATOR_FAILED),"random number generator failed"},
96{ERR_REASON(GOST_R_RANDOM_NUMBER_GENERATOR_FAILED),"random number generator failed"}, 96 {ERR_REASON(GOST_R_SIGNATURE_MISMATCH) ,"signature mismatch"},
97{ERR_REASON(GOST_R_SIGNATURE_MISMATCH) ,"signature mismatch"}, 97 {ERR_REASON(GOST_R_SIGNATURE_PARTS_GREATER_THAN_Q),"signature parts greater than q"},
98{ERR_REASON(GOST_R_SIGNATURE_PARTS_GREATER_THAN_Q),"signature parts greater than q"}, 98 {ERR_REASON(GOST_R_UKM_NOT_SET) ,"ukm not set"},
99{ERR_REASON(GOST_R_UKM_NOT_SET) ,"ukm not set"}, 99 {0, NULL}
100{0,NULL} 100};
101 };
102
103#endif 101#endif
104 102
105void ERR_load_GOST_strings(void) 103void
106 { 104ERR_load_GOST_strings(void) {
107#ifndef OPENSSL_NO_ERR 105#ifndef OPENSSL_NO_ERR
108 106 if (ERR_func_error_string(GOST_str_functs[0].error) == NULL) {
109 if (ERR_func_error_string(GOST_str_functs[0].error) == NULL)
110 {
111 ERR_load_strings(0,GOST_str_functs); 107 ERR_load_strings(0,GOST_str_functs);
112 ERR_load_strings(0,GOST_str_reasons); 108 ERR_load_strings(0,GOST_str_reasons);
113 }
114#endif
115 } 109 }
110#endif
111}