diff options
author | tedu <> | 2014-06-17 01:41:01 +0000 |
---|---|---|
committer | tedu <> | 2014-06-17 01:41:01 +0000 |
commit | 811be0dc52e1a06f6f3add77779e06406100f339 (patch) | |
tree | 48cfa9d5688b30640836c559734074771d9f18b2 /src | |
parent | acfb52126adbf0daf65110e13eae6fc2d27f7781 (diff) | |
download | openbsd-811be0dc52e1a06f6f3add77779e06406100f339.tar.gz openbsd-811be0dc52e1a06f6f3add77779e06406100f339.tar.bz2 openbsd-811be0dc52e1a06f6f3add77779e06406100f339.zip |
ssl_session_cmp is not a sort function, can use CRYPTO_memcmp here too.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_lib.c | 6 | ||||
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c index 297c80124d..04c3393053 100644 --- a/src/lib/libssl/src/ssl/ssl_lib.c +++ b/src/lib/libssl/src/ssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.67 2014/06/13 10:52:24 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.68 2014/06/17 01:41:01 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,9 @@ 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 | return (memcmp(a->session_id, b->session_id, a->session_id_length)); | 1681 | if (CRYPTO_memcmp(a->session_id, b->session_id, a->session_id_length) != 0) |
1682 | return (1); | ||
1683 | return (0); | ||
1682 | } | 1684 | } |
1683 | 1685 | ||
1684 | /* | 1686 | /* |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 297c80124d..04c3393053 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.67 2014/06/13 10:52:24 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.68 2014/06/17 01:41:01 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,9 @@ 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 | return (memcmp(a->session_id, b->session_id, a->session_id_length)); | 1681 | if (CRYPTO_memcmp(a->session_id, b->session_id, a->session_id_length) != 0) |
1682 | return (1); | ||
1683 | return (0); | ||
1682 | } | 1684 | } |
1683 | 1685 | ||
1684 | /* | 1686 | /* |