summaryrefslogtreecommitdiffstats
path: root/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-06-19 21:29:51 +0000
committertedu <tedu@openbsd.org>2014-06-19 21:29:51 +0000
commitc00bf8c60a5d0061a6eaa71135f6fed7c074ffce (patch)
tree1e45d15fc5a126542016b8ca16854da86d3b8d4e /lib/libssl/ssl_lib.c
parentcheck stack push return and make some effort to clean up. ok beck miod (diff)
downloadwireguard-openbsd-c00bf8c60a5d0061a6eaa71135f6fed7c074ffce.tar.xz
wireguard-openbsd-c00bf8c60a5d0061a6eaa71135f6fed7c074ffce.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 'lib/libssl/ssl_lib.c')
-rw-r--r--lib/libssl/ssl_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c
index 04c33930532..f867daab0ec 100644
--- a/lib/libssl/ssl_lib.c
+++ b/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_lib.c,v 1.68 2014/06/17 01:41:01 tedu Exp $ */
+/* $OpenBSD: ssl_lib.c,v 1.69 2014/06/19 21:29:51 tedu Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1678,7 +1678,7 @@ ssl_session_cmp(const SSL_SESSION *a, const SSL_SESSION *b)
return (1);
if (a->session_id_length != b->session_id_length)
return (1);
- if (CRYPTO_memcmp(a->session_id, b->session_id, a->session_id_length) != 0)
+ if (timingsafe_memcmp(a->session_id, b->session_id, a->session_id_length) != 0)
return (1);
return (0);
}