From 640a0cb0e3a12092119a3ae47972d02e5f9254e2 Mon Sep 17 00:00:00 2001 From: toddouska Date: Fri, 28 Dec 2012 18:55:18 -0800 Subject: [PATCH] fix stream hmac check on multi data --- src/internal.c | 2 +- tests/test-dtls.conf | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index 48f55176d..532899d09 100644 --- a/src/internal.c +++ b/src/internal.c @@ -3452,7 +3452,7 @@ int DoApplicationData(CYASSL* ssl, byte* input, word32* inOutIdx) } else if (ssl->specs.cipher_type == stream) { ssl->hmac(ssl, verify, rawData, msgSz - digestSz, application_data, 1); - if (ConstantCompare(verify, input + msgSz - digestSz, digestSz) != 0) { + if (ConstantCompare(verify, rawData + msgSz - digestSz, digestSz) != 0){ return VERIFY_MAC_ERROR; } } diff --git a/tests/test-dtls.conf b/tests/test-dtls.conf index db6966b98..d733e0ecf 100644 --- a/tests/test-dtls.conf +++ b/tests/test-dtls.conf @@ -1,3 +1,11 @@ +# server DTLSv1 RC4-SHA +-u +-l RC4-SHA + +# client DTLSv1 RC4-SHA +-u +-l RC4-SHA + # server DTLSv1 DES-CBC3-SHA -u -l DES-CBC3-SHA