diff options
author | 2014-06-19 21:29:51 +0000 | |
---|---|---|
committer | 2014-06-19 21:29:51 +0000 | |
commit | c00bf8c60a5d0061a6eaa71135f6fed7c074ffce (patch) | |
tree | 1e45d15fc5a126542016b8ca16854da86d3b8d4e /lib/libssl/s3_both.c | |
parent | check stack push return and make some effort to clean up. ok beck miod (diff) | |
download | wireguard-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/s3_both.c')
-rw-r--r-- | lib/libssl/s3_both.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/s3_both.c b/lib/libssl/s3_both.c index 4f40adbb1a5..2da6b527e11 100644 --- a/lib/libssl/s3_both.c +++ b/lib/libssl/s3_both.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s3_both.c,v 1.24 2014/06/12 15:49:31 deraadt Exp $ */ +/* $OpenBSD: s3_both.c,v 1.25 2014/06/19 21:29:51 tedu Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -256,7 +256,7 @@ ssl3_get_finished(SSL *s, int a, int b) goto f_err; } - if (CRYPTO_memcmp(p, s->s3->tmp.peer_finish_md, i) != 0) { + if (timingsafe_memcmp(p, s->s3->tmp.peer_finish_md, i) != 0) { al = SSL_AD_DECRYPT_ERROR; SSLerr(SSL_F_SSL3_GET_FINISHED, SSL_R_DIGEST_CHECK_FAILED); goto f_err; |