summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-10-07 21:25:27 +1100
committerDamien Miller <djm@mindrot.org>2010-10-07 21:25:27 +1100
commitaa18063baf35e303832d9ec58204ffaab221de85 (patch)
tree0b3b3e436ca70f27734c99f6ace5503418b99001 /misc.c
parent2beb32f290390c4f7c2a86dd5d096475e3b76c5b (diff)
- 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.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/misc.c b/misc.c
index 41c92a82b..ff09becf9 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.c,v 1.81 2010/09/22 22:58:51 djm Exp $ */ 1/* $OpenBSD: misc.c,v 1.82 2010/09/24 13:33:00 matthew Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved. 4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -850,17 +850,6 @@ ms_to_timeval(struct timeval *tv, int ms)
850 tv->tv_usec = (ms % 1000) * 1000; 850 tv->tv_usec = (ms % 1000) * 1000;
851} 851}
852 852
853int
854timingsafe_bcmp(const void *b1, const void *b2, size_t n)
855{
856 const unsigned char *p1 = b1, *p2 = b2;
857 int ret = 0;
858
859 for (; n > 0; n--)
860 ret |= *p1++ ^ *p2++;
861 return (ret != 0);
862}
863
864void 853void
865bandwidth_limit_init(struct bwlimit *bw, u_int64_t kbps, size_t buflen) 854bandwidth_limit_init(struct bwlimit *bw, u_int64_t kbps, size_t buflen)
866{ 855{