From: Dmitry Belyavskiy Date: Tue, 18 Dec 2018 12:07:28 +0000 (+0300) Subject: Errors adjusted X-Git-Tag: v3.0.0~328 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=e8322a529ed6d4d1da4f275f4f8771e65c832726;p=openssl-gost%2Fengine.git Errors adjusted --- diff --git a/e_gost_err.c b/e_gost_err.c index c93a434..00cdd87 100644 --- a/e_gost_err.c +++ b/e_gost_err.c @@ -2,7 +2,7 @@ * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * - * Licensed under the OpenSSL license (the "License"). You may not use + * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html @@ -92,6 +92,8 @@ static ERR_STRING_DATA GOST_str_reasons[] = { "bad pkey parameters format"}, {ERR_PACK(0, 0, GOST_R_CANNOT_PACK_EPHEMERAL_KEY), "cannot pack ephemeral key"}, + {ERR_PACK(0, 0, GOST_R_CANNOT_UNPACK_EPHEMERAL_KEY), + "cannot unpack ephemeral key"}, {ERR_PACK(0, 0, GOST_R_CIPHER_NOT_FOUND), "cipher not found"}, {ERR_PACK(0, 0, GOST_R_CTRL_CALL_FAILED), "ctrl call failed"}, {ERR_PACK(0, 0, GOST_R_ERROR_COMPUTING_EXPORT_KEYS), diff --git a/e_gost_err.h b/e_gost_err.h index 39b3da2..c5c9733 100644 --- a/e_gost_err.h +++ b/e_gost_err.h @@ -2,7 +2,7 @@ * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * - * Licensed under the OpenSSL license (the "License"). You may not use + * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html @@ -90,6 +90,7 @@ void ERR_GOST_error(int function, int reason, char *file, int line); # define GOST_R_BAD_ORDER 132 # define GOST_R_BAD_PKEY_PARAMETERS_FORMAT 101 # define GOST_R_CANNOT_PACK_EPHEMERAL_KEY 102 +# define GOST_R_CANNOT_UNPACK_EPHEMERAL_KEY 136 # define GOST_R_CIPHER_NOT_FOUND 103 # define GOST_R_CTRL_CALL_FAILED 104 # define GOST_R_ERROR_COMPUTING_EXPORT_KEYS 135 diff --git a/gost.txt b/gost.txt index a0cb8ab..15d986b 100644 --- a/gost.txt +++ b/gost.txt @@ -1,6 +1,6 @@ # Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. # -# Licensed under the OpenSSL license (the "License"). You may not use +# Licensed under the Apache License 2.0 (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy # in the file LICENSE in the source distribution or at # https://www.openssl.org/source/license.html @@ -69,6 +69,7 @@ GOST_R_BAD_MAC:133:bad mac GOST_R_BAD_ORDER:132:bad order GOST_R_BAD_PKEY_PARAMETERS_FORMAT:101:bad pkey parameters format GOST_R_CANNOT_PACK_EPHEMERAL_KEY:102:cannot pack ephemeral key +GOST_R_CANNOT_UNPACK_EPHEMERAL_KEY:136:cannot unpack ephemeral key GOST_R_CIPHER_NOT_FOUND:103:cipher not found GOST_R_CTRL_CALL_FAILED:104:ctrl call failed GOST_R_ERROR_COMPUTING_EXPORT_KEYS:135:error computing export keys diff --git a/gost_ec_keyx.c b/gost_ec_keyx.c index 2a858ac..79e9a85 100644 --- a/gost_ec_keyx.c +++ b/gost_ec_keyx.c @@ -607,7 +607,7 @@ static int pkey_gost2018_decrypt(EVP_PKEY_CTX *pctx, unsigned char *key, ASN1_STRING_length(pst->psexp), data->cipher_nid, expkeys + 32, mac_nid, expkeys + 0, data->shared_ukm + 24, iv_len, key) <= 0) { - GOSTerr(GOST_F_PKEY_GOST2018_DECRYPT, GOST_R_CANNOT_PACK_EPHEMERAL_KEY); + GOSTerr(GOST_F_PKEY_GOST2018_DECRYPT, GOST_R_CANNOT_UNPACK_EPHEMERAL_KEY); goto err; }