From: igrkir Date: Sun, 12 Feb 2023 10:47:54 +0000 (+0300) Subject: fix typo causing 'bad mac' error in tls 1.3 handshake X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=30cd9189c5dc6b09877208fbbd5ea765199436f6;p=openssl-gost%2Fengine.git fix typo causing 'bad mac' error in tls 1.3 handshake --- 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; }