summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/crypto/cryptosoft.c67
1 files changed, 33 insertions, 34 deletions
diff --git a/sys/crypto/cryptosoft.c b/sys/crypto/cryptosoft.c
index 9ae12656614..8d764670abd 100644
--- a/sys/crypto/cryptosoft.c
+++ b/sys/crypto/cryptosoft.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptosoft.c,v 1.34 2002/04/22 23:10:09 deraadt Exp $ */
+/* $OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
@@ -825,7 +825,7 @@ swcr_process(struct cryptop *crp)
/* Sanity check */
if (crp == NULL)
- return EINVAL;
+ return EINVAL;
if (crp->crp_desc == NULL || crp->crp_buf == NULL) {
crp->crp_etype = EINVAL;
@@ -916,38 +916,37 @@ void
swcr_init(void)
{
swcr_id = crypto_get_driverid(CRYPTOCAP_F_SOFTWARE);
- if (swcr_id >= 0) {
- crypto_register(swcr_id, CRYPTO_DES_CBC, 0, 0, swcr_newsession,
- swcr_freesession, swcr_process);
- crypto_register(swcr_id, CRYPTO_3DES_CBC, 0, 0,
- NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_BLF_CBC, 0, 0,
- NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_CAST_CBC, 0, 0,
- NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_SKIPJACK_CBC, 0, 0,
- NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_MD5_HMAC, 0, 0,
- NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_SHA1_HMAC, 0, 0,
- NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_RIPEMD160_HMAC, 0, 0,
- NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_MD5_KPDK, 0, 0,
- NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_SHA1_KPDK, 0, 0,
- NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_MD5, 0, 0,
- NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_SHA1, 0, 0,
- NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_RIJNDAEL128_CBC, 0, 0,
- NULL, NULL, NULL);
- crypto_register(swcr_id, CRYPTO_DEFLATE_COMP, 0, 0,
- NULL, NULL, NULL);
- return;
+ if (swcr_id < 0) {
+ /* This should never happen */
+ panic("Software crypto device cannot initialize!");
}
- /* This should never happen */
- panic("Software crypto device cannot initialize!");
+ crypto_register(swcr_id, CRYPTO_DES_CBC, 0, 0, swcr_newsession,
+ swcr_freesession, swcr_process);
+ crypto_register(swcr_id, CRYPTO_3DES_CBC, 0, 0,
+ NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_BLF_CBC, 0, 0,
+ NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_CAST_CBC, 0, 0,
+ NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_SKIPJACK_CBC, 0, 0,
+ NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_MD5_HMAC, 0, 0,
+ NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_SHA1_HMAC, 0, 0,
+ NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_RIPEMD160_HMAC, 0, 0,
+ NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_MD5_KPDK, 0, 0,
+ NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_SHA1_KPDK, 0, 0,
+ NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_MD5, 0, 0,
+ NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_SHA1, 0, 0,
+ NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_RIJNDAEL128_CBC, 0, 0,
+ NULL, NULL, NULL);
+ crypto_register(swcr_id, CRYPTO_DEFLATE_COMP, 0, 0,
+ NULL, NULL, NULL);
}