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/s3_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/s3_pkt.c')
-rw-r--r-- | src/lib/libssl/s3_pkt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/s3_pkt.c b/src/lib/libssl/s3_pkt.c index f5d8bedbea..a508d5ee49 100644 --- a/src/lib/libssl/s3_pkt.c +++ b/src/lib/libssl/s3_pkt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_pkt.c,v 1.47 2014/06/13 10:52:24 jsing Exp $ */ | 1 | /* $OpenBSD: s3_pkt.c,v 1.48 2014/06/19 21:29:51 tedu Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -447,7 +447,7 @@ again: | |||
447 | 447 | ||
448 | i = s->method->ssl3_enc->mac(s,md,0 /* not send */); | 448 | i = s->method->ssl3_enc->mac(s,md,0 /* not send */); |
449 | if (i < 0 || mac == NULL || | 449 | if (i < 0 || mac == NULL || |
450 | CRYPTO_memcmp(md, mac, (size_t)mac_size) != 0) | 450 | timingsafe_memcmp(md, mac, (size_t)mac_size) != 0) |
451 | enc_err = -1; | 451 | enc_err = -1; |
452 | if (rr->length > | 452 | if (rr->length > |
453 | SSL3_RT_MAX_COMPRESSED_LENGTH + extra + mac_size) | 453 | SSL3_RT_MAX_COMPRESSED_LENGTH + extra + mac_size) |