diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2010-09-24 13:33:01 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2010-09-24 13:33:01 +0000 |
commit | 8749451f0138f265fd023c0b6ee529b680bd9ffe (patch) | |
tree | c80d8cd5225b91dfc83536aa12124a6007c38715 /usr.bin | |
parent | 898c385370762cd3fd1a6fa08058a30f7511fa79 (diff) |
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@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/misc.c | 13 | ||||
-rw-r--r-- | usr.bin/ssh/misc.h | 3 |
2 files changed, 2 insertions, 14 deletions
diff --git a/usr.bin/ssh/misc.c b/usr.bin/ssh/misc.c index 9b18dcccdf0..6a128902617 100644 --- a/usr.bin/ssh/misc.c +++ b/usr.bin/ssh/misc.c @@ -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. @@ -830,17 +830,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) { diff --git a/usr.bin/ssh/misc.h b/usr.bin/ssh/misc.h index 80ec671acac..f7887a18613 100644 --- a/usr.bin/ssh/misc.h +++ b/usr.bin/ssh/misc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.h,v 1.44 2010/09/22 22:58:51 djm Exp $ */ +/* $OpenBSD: misc.h,v 1.45 2010/09/24 13:33:00 matthew Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -35,7 +35,6 @@ char *tohex(const void *, size_t); void sanitise_stdfd(void); void ms_subtract_diff(struct timeval *, int *); void ms_to_timeval(struct timeval *, int); -int timingsafe_bcmp(const void *, const void *, size_t); struct passwd *pwcopy(struct passwd *); const char *ssh_gai_strerror(int); |