]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - gost_grasshopper_cipher.c
fix typo causing 'bad mac' error in tls 1.3 handshake
[openssl-gost/engine.git] / gost_grasshopper_cipher.c
index d37ae66f9ad20f67544453abd457ed780331c0a6..105fd42192b99a2370767f3a757635a927000f70 100644 (file)
@@ -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;