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/ssl_lib.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/ssl_lib.c')
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 04c3393053..f867daab0e 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.68 2014/06/17 01:41:01 tedu Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.69 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 | * |
@@ -1678,7 +1678,7 @@ ssl_session_cmp(const SSL_SESSION *a, const SSL_SESSION *b) | |||
1678 | return (1); | 1678 | return (1); |
1679 | if (a->session_id_length != b->session_id_length) | 1679 | if (a->session_id_length != b->session_id_length) |
1680 | return (1); | 1680 | return (1); |
1681 | if (CRYPTO_memcmp(a->session_id, b->session_id, a->session_id_length) != 0) | 1681 | if (timingsafe_memcmp(a->session_id, b->session_id, a->session_id_length) != 0) |
1682 | return (1); | 1682 | return (1); |
1683 | return (0); | 1683 | return (0); |
1684 | } | 1684 | } |