diff options
author | Damien Miller <djm@mindrot.org> | 2010-10-07 21:25:27 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2010-10-07 21:25:27 +1100 |
commit | aa18063baf35e303832d9ec58204ffaab221de85 (patch) | |
tree | 0b3b3e436ca70f27734c99f6ace5503418b99001 /misc.c | |
parent | 2beb32f290390c4f7c2a86dd5d096475e3b76c5b (diff) | |
download | openssh-git-aa18063baf35e303832d9ec58204ffaab221de85.tar.gz |
- matthew@cvs.openbsd.org 2010/09/24 13:33:00
[misc.c misc.h configure.ac openbsd-compat/openbsd-compat.h]
[openbsd-compat/timingsafe_bcmp.c]
Add timingsafe_bcmp(3) to libc, mention that it's already in the
kernel in kern(9), and remove it from OpenSSH.
ok deraadt@, djm@
NB. re-added under openbsd-compat/ for portable OpenSSH
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.81 2010/09/22 22:58:51 djm Exp $ */ +/* $OpenBSD: misc.c,v 1.82 2010/09/24 13:33:00 matthew Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -850,17 +850,6 @@ ms_to_timeval(struct timeval *tv, int ms) tv->tv_usec = (ms % 1000) * 1000; } -int -timingsafe_bcmp(const void *b1, const void *b2, size_t n) -{ - const unsigned char *p1 = b1, *p2 = b2; - int ret = 0; - - for (; n > 0; n--) - ret |= *p1++ ^ *p2++; - return (ret != 0); -} - void bandwidth_limit_init(struct bwlimit *bw, u_int64_t kbps, size_t buflen) { |