From 020bd93ad37b37f55314135a27408e8f77e054cb Mon Sep 17 00:00:00 2001 From: Bob Beck Date: Mon, 10 Jun 2002 22:36:50 +0000 Subject: fix ivory tower greek fix. ok angelos@ --- sys/crypto/crypto.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sys') diff --git a/sys/crypto/crypto.c b/sys/crypto/crypto.c index 9b73088e661..4a8be65e07e 100644 --- a/sys/crypto/crypto.c +++ b/sys/crypto/crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto.c,v 1.36 2002/06/09 22:23:17 angelos Exp $ */ +/* $OpenBSD: crypto.c,v 1.37 2002/06/10 22:36:49 beck Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) * @@ -597,18 +597,19 @@ crypto_getfeat(int *featp) extern int cryptodevallowsoft; int hid, kalg, feat = 0; + memset(kalgs, 0, sizeof(kalgs)); + for (hid = 0; hid < crypto_drivers_num; hid++) { if ((crypto_drivers[hid].cc_flags & CRYPTOCAP_F_SOFTWARE) && - cryptodevallowsoft == 0) + cryptodevallowsoft == 0) { continue; + } if (crypto_drivers[hid].cc_kprocess == NULL) continue; for (kalg = 0; kalg < CRK_ALGORITHM_MAX; kalg++) if ((crypto_drivers[hid].cc_kalg[kalg] & - CRYPTO_ALG_FLAG_SUPPORTED) != 0) + CRYPTO_ALG_FLAG_SUPPORTED) != 0) kalgs[kalg] = 1; - else - kalgs[kalg] = 0; } if (kalgs[CRK_MOD_EXP] && kalgs[CRK_MOD_EXP_CRT]) -- cgit v1.2.3