From 0cebc2172c5721d74f27b778bedaeea51d4015bb Mon Sep 17 00:00:00 2001 From: Go Hosohara Date: Wed, 12 Apr 2017 00:03:35 +0900 Subject: [PATCH] Fix WolfSSL_DES_ecb_encrypt(). --- src/ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssl.c b/src/ssl.c index 4af136dee..f9833f368 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -15803,7 +15803,7 @@ void wolfSSL_DES_ecb_encrypt(WOLFSSL_DES_cblock* desa, if (desa == NULL || key == NULL || desb == NULL || (enc != DES_ENCRYPT && enc != DES_DECRYPT)){ WOLFSSL_MSG("Bad argument passed to wolfSSL_DES_ecb_encrypt"); } else { - if (wc_Des3_SetKey(&myDes, (const byte*) key, (const byte*) NULL, enc) != 0){ + if (wc_Des3_SetKey(&myDes, (const byte*) key, (const byte*) NULL, !enc) != 0){ WOLFSSL_MSG("wc_Des3_SetKey return error."); } if (enc){