diff options
author | tedu <> | 2014-06-19 21:29:51 +0000 |
---|---|---|
committer | tedu <> | 2014-06-19 21:29:51 +0000 |
commit | 150e8864673fb3b65a00e9188f50ca6a5bae927d (patch) | |
tree | 7d822bfb3203433ec1d2621e3b77a893bd97b408 /src/lib/libssl/d1_pkt.c | |
parent | 41e038d2e8f6a205e6aa50aa0e910df4ff76ec9e (diff) | |
download | openbsd-150e8864673fb3b65a00e9188f50ca6a5bae927d.tar.gz openbsd-150e8864673fb3b65a00e9188f50ca6a5bae927d.tar.bz2 openbsd-150e8864673fb3b65a00e9188f50ca6a5bae927d.zip |
convert CRYPTO_memcmp to timingsafe_memcmp based on current policy favoring
libc interfaces over libcrypto interfaces. for now we also prefer
timingsafe_memcmp over timingsafe_bcmp, even when the latter is acceptable.
ok beck deraadt matthew miod
Diffstat (limited to 'src/lib/libssl/d1_pkt.c')
-rw-r--r-- | src/lib/libssl/d1_pkt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index aa2185d2ed..d75f56beb6 100644 --- a/src/lib/libssl/d1_pkt.c +++ b/src/lib/libssl/d1_pkt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_pkt.c,v 1.29 2014/06/15 15:29:25 jsing Exp $ */ | 1 | /* $OpenBSD: d1_pkt.c,v 1.30 2014/06/19 21:29:51 tedu Exp $ */ |
2 | /* | 2 | /* |
3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
@@ -414,7 +414,7 @@ dtls1_process_record(SSL *s) | |||
414 | } | 414 | } |
415 | 415 | ||
416 | i = s->method->ssl3_enc->mac(s, md, 0 /* not send */); | 416 | i = s->method->ssl3_enc->mac(s, md, 0 /* not send */); |
417 | if (i < 0 || mac == NULL || CRYPTO_memcmp(md, mac, (size_t)mac_size) != 0) | 417 | if (i < 0 || mac == NULL || timingsafe_memcmp(md, mac, (size_t)mac_size) != 0) |
418 | enc_err = -1; | 418 | enc_err = -1; |
419 | if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH + mac_size) | 419 | if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH + mac_size) |
420 | enc_err = -1; | 420 | enc_err = -1; |