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/s3_both.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/s3_both.c')
-rw-r--r-- | src/lib/libssl/s3_both.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/s3_both.c b/src/lib/libssl/s3_both.c index 4f40adbb1a..2da6b527e1 100644 --- a/src/lib/libssl/s3_both.c +++ b/src/lib/libssl/s3_both.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_both.c,v 1.24 2014/06/12 15:49:31 deraadt Exp $ */ | 1 | /* $OpenBSD: s3_both.c,v 1.25 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 | * |
@@ -256,7 +256,7 @@ ssl3_get_finished(SSL *s, int a, int b) | |||
256 | goto f_err; | 256 | goto f_err; |
257 | } | 257 | } |
258 | 258 | ||
259 | if (CRYPTO_memcmp(p, s->s3->tmp.peer_finish_md, i) != 0) { | 259 | if (timingsafe_memcmp(p, s->s3->tmp.peer_finish_md, i) != 0) { |
260 | al = SSL_AD_DECRYPT_ERROR; | 260 | al = SSL_AD_DECRYPT_ERROR; |
261 | SSLerr(SSL_F_SSL3_GET_FINISHED, SSL_R_DIGEST_CHECK_FAILED); | 261 | SSLerr(SSL_F_SSL3_GET_FINISHED, SSL_R_DIGEST_CHECK_FAILED); |
262 | goto f_err; | 262 | goto f_err; |