From 3ff4b0241cf5bc265e8f61f53b39b701fa0d9317 Mon Sep 17 00:00:00 2001 From: Horia Geanta Date: Tue, 3 Dec 2013 16:50:19 +0200 Subject: crypto: testmgr - fix tls encrypt testvec for zero plaintext The test vector for zero plaintext tls encrypt had a typo in it: the pre ICV len (last two bytes of assoc data) were being set to "00 10" instead of "00 00". This caused the result (SHA1 + padding) to be different than expected. Change-Id: I81ef14f0e1f8660854ad2faaf13bc2a9fdca5755 Signed-off-by: Horia Geanta Reviewed-on: http://git.am.freescale.net:8181/7062 Reviewed-by: Mircea Pop Reviewed-by: Cristian Stoica Reviewed-by: Thomas Trefny Tested-by: Zhenhua Luo (cherry picked from commit dd23644ca6c56cb3b8ee5b3d6c22e3ee6c17f957) Reviewed-on: http://git.am.freescale.net:8181/10375 Reviewed-by: Alexandru Porosanu Tested-by: Review Code-CDREVIEW Reviewed-by: Jose Rivera diff --git a/crypto/testmgr.h b/crypto/testmgr.h index 72b4e80..93638c1 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h @@ -157,12 +157,12 @@ static struct tls_testvec tls_enc_tv_template[] = { .input = "", .ilen = 0, .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07" - "\x00\x03\x01\x00\x10", + "\x00\x03\x01\x00\x00", .alen = 13, - .result = "\xa3\xdc\xf9\xac\x52\x70\x08\xcf" - "\x8d\x47\xbb\xe0\x64\xc0\x89\x2c" - "\xfb\x5d\x2d\x43\x35\x16\xeb\x4c" - "\x55\xb7\xcf\xaa\x9a\xe0\x02\x71", + .result = "\x58\x2a\x11\xc\x86\x8e\x4b\x67" + "\x2d\x16\x26\x1a\xac\x4b\xe2\x1a" + "\xe9\x6a\xcc\x4d\x6f\x79\x8a\x45" + "\x1f\x4e\x27\xf2\xa7\x59\xb4\x5a", .rlen = 20 + 12, } }; -- cgit v0.10.2