summaryrefslogtreecommitdiff
path: root/lib/libssl
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-06-17 01:41:02 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-06-17 01:41:02 +0000
commita15be4ddfe931f66e18df1dadd2fc98b85b05a2f (patch)
tree10427c887aac7e9270de978a2e704d0f5f1aa586 /lib/libssl
parent2021152858db1c1d28bedb3adf6a3c5d71ce788d (diff)
ssl_session_cmp is not a sort function, can use CRYPTO_memcmp here too.
Diffstat (limited to 'lib/libssl')
-rw-r--r--lib/libssl/src/ssl/ssl_lib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libssl/src/ssl/ssl_lib.c b/lib/libssl/src/ssl/ssl_lib.c
index 297c80124d8..04c33930532 100644
--- a/lib/libssl/src/ssl/ssl_lib.c
+++ b/lib/libssl/src/ssl/ssl_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_lib.c,v 1.67 2014/06/13 10:52:24 jsing Exp $ */
+/* $OpenBSD: ssl_lib.c,v 1.68 2014/06/17 01:41:01 tedu Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1678,7 +1678,9 @@ ssl_session_cmp(const SSL_SESSION *a, const SSL_SESSION *b)
return (1);
if (a->session_id_length != b->session_id_length)
return (1);
- return (memcmp(a->session_id, b->session_id, a->session_id_length));
+ if (CRYPTO_memcmp(a->session_id, b->session_id, a->session_id_length) != 0)
+ return (1);
+ return (0);
}
/*