]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Errors adjusted
authorDmitry Belyavskiy <beldmit@gmail.com>
Tue, 18 Dec 2018 12:07:28 +0000 (15:07 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Tue, 18 Dec 2018 12:07:28 +0000 (15:07 +0300)
e_gost_err.c
e_gost_err.h
gost.txt
gost_ec_keyx.c

index c93a434058cf5acbedb6b532d9668b0b4b639f79..00cdd877c42b59c170fc002dbdec87ea6d2d219f 100644 (file)
@@ -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),
index 39b3da2c087aeab347a7bef489dde9178332b6fe..c5c97330adad3f73bfc229a82efcf3bc4584869d 100644 (file)
@@ -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
index a0cb8ab4257860df4e60090bf6352fd64c9899d2..15d986b9a06d051b3cdaa58938c04158167645f5 100644 (file)
--- 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
index 2a858ac22921ccb56b31e32a6c6c2040f25d280b..79e9a851dc47b33990c1bda328bdf489a6b2e8ee 100644 (file)
@@ -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;
     }