size of buffer with DES ecb encrypt

This commit is contained in:
Jacob Barthelmeh
2017-05-08 10:10:52 -06:00
parent 982e9ab8ad
commit 47a2783cf1

View File

@@ -20160,9 +20160,16 @@ void wolfSSL_DES_ecb_encrypt(WOLFSSL_DES_cblock* desa,
WOLFSSL_MSG("wc_Des_SetKey return error."); WOLFSSL_MSG("wc_Des_SetKey return error.");
return; return;
} }
if (wc_Des_EcbEncrypt(&myDes, (byte*) desb, if (enc){
(const byte*)desa, sizeof(WOLFSSL_DES_cblock)) != 0){ if (wc_Des_EcbEncrypt(&myDes, (byte*) desb, (const byte*) desa,
WOLFSSL_MSG("wc_Des_EcbEncrypt return error."); sizeof(WOLFSSL_DES_cblock)) != 0){
WOLFSSL_MSG("wc_Des_EcbEncrpyt return error.");
}
} else {
if (wc_Des_EcbDecrypt(&myDes, (byte*) desb, (const byte*) desa,
sizeof(WOLFSSL_DES_cblock)) != 0){
WOLFSSL_MSG("wc_Des_EcbDecrpyt return error.");
}
} }
} }
} }