diff options
author | tedu <> | 2014-06-21 20:27:25 +0000 |
---|---|---|
committer | tedu <> | 2014-06-21 20:27:25 +0000 |
commit | 9792ceb010ad6377f4e016b43301244289ddf2f1 (patch) | |
tree | 8a5da5b6cd0c6d564a1b5211658d6c23da0ddee6 /src/lib/libssl/ssl_sess.c | |
parent | e4a00d72f460a6b1ae6fd91aae01686bfbd0f3f3 (diff) | |
download | openbsd-9792ceb010ad6377f4e016b43301244289ddf2f1.tar.gz openbsd-9792ceb010ad6377f4e016b43301244289ddf2f1.tar.bz2 openbsd-9792ceb010ad6377f4e016b43301244289ddf2f1.zip |
always compare memcmp against 0, for clarity.
Diffstat (limited to 'src/lib/libssl/ssl_sess.c')
-rw-r--r-- | src/lib/libssl/ssl_sess.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c index 9046dce7f8..7932f20151 100644 --- a/src/lib/libssl/ssl_sess.c +++ b/src/lib/libssl/ssl_sess.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_sess.c,v 1.33 2014/06/19 21:29:51 tedu Exp $ */ | 1 | /* $OpenBSD: ssl_sess.c,v 1.34 2014/06/21 20:27:25 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 | * |
@@ -498,7 +498,7 @@ ssl_get_prev_session(SSL *s, unsigned char *session_id, int len, | |||
498 | /* Now ret is non-NULL and we own one of its reference counts. */ | 498 | /* Now ret is non-NULL and we own one of its reference counts. */ |
499 | 499 | ||
500 | if (ret->sid_ctx_length != s->sid_ctx_length | 500 | if (ret->sid_ctx_length != s->sid_ctx_length |
501 | || timingsafe_memcmp(ret->sid_ctx, s->sid_ctx, ret->sid_ctx_length)) { | 501 | || timingsafe_memcmp(ret->sid_ctx, s->sid_ctx, ret->sid_ctx_length) != 0) { |
502 | /* We have the session requested by the client, but we don't | 502 | /* We have the session requested by the client, but we don't |
503 | * want to use it in this context. */ | 503 | * want to use it in this context. */ |
504 | goto err; /* treat like cache miss */ | 504 | goto err; /* treat like cache miss */ |