Skip to content

Commit e8322a5

Browse files
committedDec 18, 2018
Errors adjusted
1 parent 61afc2c commit e8322a5

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed
 

‎e_gost_err.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Generated by util/mkerr.pl DO NOT EDIT
33
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
44
*
5-
* Licensed under the OpenSSL license (the "License"). You may not use
5+
* Licensed under the Apache License 2.0 (the "License"). You may not use
66
* this file except in compliance with the License. You can obtain a copy
77
* in the file LICENSE in the source distribution or at
88
* https://www.openssl.org/source/license.html
@@ -92,6 +92,8 @@ static ERR_STRING_DATA GOST_str_reasons[] = {
9292
"bad pkey parameters format"},
9393
{ERR_PACK(0, 0, GOST_R_CANNOT_PACK_EPHEMERAL_KEY),
9494
"cannot pack ephemeral key"},
95+
{ERR_PACK(0, 0, GOST_R_CANNOT_UNPACK_EPHEMERAL_KEY),
96+
"cannot unpack ephemeral key"},
9597
{ERR_PACK(0, 0, GOST_R_CIPHER_NOT_FOUND), "cipher not found"},
9698
{ERR_PACK(0, 0, GOST_R_CTRL_CALL_FAILED), "ctrl call failed"},
9799
{ERR_PACK(0, 0, GOST_R_ERROR_COMPUTING_EXPORT_KEYS),

‎e_gost_err.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Generated by util/mkerr.pl DO NOT EDIT
33
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
44
*
5-
* Licensed under the OpenSSL license (the "License"). You may not use
5+
* Licensed under the Apache License 2.0 (the "License"). You may not use
66
* this file except in compliance with the License. You can obtain a copy
77
* in the file LICENSE in the source distribution or at
88
* https://www.openssl.org/source/license.html
@@ -90,6 +90,7 @@ void ERR_GOST_error(int function, int reason, char *file, int line);
9090
# define GOST_R_BAD_ORDER 132
9191
# define GOST_R_BAD_PKEY_PARAMETERS_FORMAT 101
9292
# define GOST_R_CANNOT_PACK_EPHEMERAL_KEY 102
93+
# define GOST_R_CANNOT_UNPACK_EPHEMERAL_KEY 136
9394
# define GOST_R_CIPHER_NOT_FOUND 103
9495
# define GOST_R_CTRL_CALL_FAILED 104
9596
# define GOST_R_ERROR_COMPUTING_EXPORT_KEYS 135

‎gost.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved.
22
#
3-
# Licensed under the OpenSSL license (the "License"). You may not use
3+
# Licensed under the Apache License 2.0 (the "License"). You may not use
44
# this file except in compliance with the License. You can obtain a copy
55
# in the file LICENSE in the source distribution or at
66
# https://www.openssl.org/source/license.html
@@ -69,6 +69,7 @@ GOST_R_BAD_MAC:133:bad mac
6969
GOST_R_BAD_ORDER:132:bad order
7070
GOST_R_BAD_PKEY_PARAMETERS_FORMAT:101:bad pkey parameters format
7171
GOST_R_CANNOT_PACK_EPHEMERAL_KEY:102:cannot pack ephemeral key
72+
GOST_R_CANNOT_UNPACK_EPHEMERAL_KEY:136:cannot unpack ephemeral key
7273
GOST_R_CIPHER_NOT_FOUND:103:cipher not found
7374
GOST_R_CTRL_CALL_FAILED:104:ctrl call failed
7475
GOST_R_ERROR_COMPUTING_EXPORT_KEYS:135:error computing export keys

‎gost_ec_keyx.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ static int pkey_gost2018_decrypt(EVP_PKEY_CTX *pctx, unsigned char *key,
607607
ASN1_STRING_length(pst->psexp), data->cipher_nid,
608608
expkeys + 32, mac_nid, expkeys + 0, data->shared_ukm + 24,
609609
iv_len, key) <= 0) {
610-
GOSTerr(GOST_F_PKEY_GOST2018_DECRYPT, GOST_R_CANNOT_PACK_EPHEMERAL_KEY);
610+
GOSTerr(GOST_F_PKEY_GOST2018_DECRYPT, GOST_R_CANNOT_UNPACK_EPHEMERAL_KEY);
611611
goto err;
612612
}
613613

0 commit comments

Comments
 (0)