Add and use a constant-time memcmp.
authorBen Laurie <ben@links.org>
Mon, 28 Jan 2013 17:30:38 +0000 (17:30 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 5 Feb 2013 16:46:15 +0000 (16:46 +0000)
commit9c00a950604aca819cee977f1dcb4b45f2af3aa6
treead8b5da2caa00d90333a1f0aa4dabab392a8c916
parentebc71865f0506a293242bd4aec97cdc7a8ef24b0
Add and use a constant-time memcmp.

This change adds CRYPTO_memcmp, which compares two vectors of bytes in
an amount of time that's independent of their contents. It also changes
several MAC compares in the code to use this over the standard memcmp,
which may leak information about the size of a matching prefix.
(cherry picked from commit 2ee798880a246d648ecddadc5b91367bee4a5d98)

Conflicts:
crypto/crypto.h
ssl/t1_lib.c
crypto/cryptlib.c
crypto/crypto.h
crypto/rsa/rsa_oaep.c
ssl/d1_pkt.c
ssl/s2_clnt.c
ssl/s2_pkt.c
ssl/s3_both.c
ssl/s3_pkt.c
ssl/t1_lib.c