diff options
author | igrkir <i.kirillov@kryptonite.ru> | 2023-02-12 13:47:54 +0300 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@users.noreply.github.com> | 2023-02-12 16:59:10 +0100 |
commit | 30cd9189c5dc6b09877208fbbd5ea765199436f6 (patch) | |
tree | 4467ca88de8c07511598e8ef65719ba39092e39e | |
parent | b776aa3864091a3474e4463cee13a1fae7eed82d (diff) | |
download | gost-engine-30cd9189c5dc6b09877208fbbd5ea765199436f6.zip gost-engine-30cd9189c5dc6b09877208fbbd5ea765199436f6.tar.gz gost-engine-30cd9189c5dc6b09877208fbbd5ea765199436f6.tar.bz2 |
fix typo causing 'bad mac' error in tls 1.3 handshake
-rw-r--r-- | gost_crypt.c | 4 | ||||
-rw-r--r-- | gost_grasshopper_cipher.c | 4 | ||||
-rw-r--r-- | gost_keyexpimp.c | 1 |
3 files changed, 7 insertions, 2 deletions
diff --git a/gost_crypt.c b/gost_crypt.c index 62da4f2..088ee59 100644 --- a/gost_crypt.c +++ b/gost_crypt.c @@ -1132,9 +1132,11 @@ static int gost_magma_mgm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) > 0) { magma_key(&mctx->ks.g_ks.cctx, newkey); memset(newkey, 0, sizeof(newkey)); + + return 1; } } - return 1; + return -1; default: return -1; diff --git a/gost_grasshopper_cipher.c b/gost_grasshopper_cipher.c index d37ae66..105fd42 100644 --- a/gost_grasshopper_cipher.c +++ b/gost_grasshopper_cipher.c @@ -1097,9 +1097,11 @@ static int gost_grasshopper_mgm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void > 0) { gost_grasshopper_cipher_key(&mctx->ks.gh_ks, newkey); memset(newkey, 0, sizeof(newkey)); + + return 1; } } - return 1; + return -1; default: return -1; diff --git a/gost_keyexpimp.c b/gost_keyexpimp.c index 12e0eaa..6cbb342 100644 --- a/gost_keyexpimp.c +++ b/gost_keyexpimp.c @@ -308,6 +308,7 @@ int gost_tlstree(int cipher_nid, const unsigned char *in, unsigned char *out, c1 = 0x00000000000000f8; c2 = 0x00000000f0ffffff; c3 = 0x00e0ffffffffffff; + break; default: return 0; } |