summaryrefslogtreecommitdiff
path: root/sys/dev/pci/ises.c
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2003-02-18 18:16:22 +0000
committerJason Wright <jason@cvs.openbsd.org>2003-02-18 18:16:22 +0000
commit808fe626921f5e188895322e328c3ea90cd896c5 (patch)
tree6bc1967cb172ccde1c0afef179cea254e084dfdc /sys/dev/pci/ises.c
parent3c9bb8249b2022eaf90e6f71206a7ce32f8b3661 (diff)
convert to new registration scheme
Diffstat (limited to 'sys/dev/pci/ises.c')
-rw-r--r--sys/dev/pci/ises.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/sys/dev/pci/ises.c b/sys/dev/pci/ises.c
index 1591e5e3ae1..25bff0051c6 100644
--- a/sys/dev/pci/ises.c
+++ b/sys/dev/pci/ises.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ises.c,v 1.22 2002/07/05 21:21:17 jason Exp $ */
+/* $OpenBSD: ises.c,v 1.23 2003/02/18 18:16:21 jason Exp $ */
/*
* Copyright (c) 2000, 2001 Håkan Olsson (ho@crt.se)
@@ -291,7 +291,7 @@ ises_initstate(void *v)
struct ises_softc *sc = v;
char *dv = sc->sc_dv.dv_xname;
u_int32_t stat;
- int p, ticks;
+ int p, ticks, algs[CRYPTO_ALGORITHM_MAX + 1];
static int retry_count = 0; /* XXX Should be in softc */
ticks = hz * 3 / 2; /* 1.5s */
@@ -499,19 +499,16 @@ ises_initstate(void *v)
printf("\n");
/* Register ourselves with crypto framework. */
- p = crypto_register(sc->sc_cid, CRYPTO_3DES_CBC, 0, 0,
- ises_newsession, ises_freesession, ises_process);
- p |= crypto_register(sc->sc_cid, CRYPTO_DES_CBC, 0, 0,
- NULL, NULL, NULL);
- p |= crypto_register(sc->sc_cid, CRYPTO_MD5_HMAC, 0, 0,
- NULL, NULL, NULL);
- p |= crypto_register(sc->sc_cid, CRYPTO_SHA1_HMAC, 0, 0,
- NULL, NULL, NULL);
- p |= crypto_register(sc->sc_cid, CRYPTO_RIPEMD160_HMAC, 0, 0,
- NULL, NULL, NULL);
- if (p)
- printf("%s: could not register all algorithms\n", dv);
+ bzero(algs, sizeof(algs));
+
+ algs[CRYPTO_3DES_CBC] = CRYPTO_ALG_FLAG_SUPPORTED;
+ algs[CRYPTO_DES_CBC] = CRYPTO_ALG_FLAG_SUPPORTED;
+ algs[CRYPTO_MD5_HMAC] = CRYPTO_ALG_FLAG_SUPPORTED;
+ algs[CRYPTO_SHA1_HMAC] = CRYPTO_ALG_FLAG_SUPPORTED;
+ algs[CRYPTO_RIPEMD160_HMAC] = CRYPTO_ALG_FLAG_SUPPORTED;
+ crypto_register(sc->sc_cid, algs,
+ ises_newsession, ises_freesession, ises_process);
return;
default: