summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/crypto/crypto.c14
-rw-r--r--sys/crypto/crypto.h4
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/crypto/crypto.c b/sys/crypto/crypto.c
index d6a4f4cedc0..fa7dea72bbd 100644
--- a/sys/crypto/crypto.c
+++ b/sys/crypto/crypto.c
@@ -205,8 +205,9 @@ crypto_get_driverid(void)
* supported by the driver.
*/
int
-crypto_register(u_int32_t driverid, int alg, void *newses, void *freeses,
- void *process)
+crypto_register(u_int32_t driverid, int alg,
+ int (*newses)(u_int32_t *, struct cryptoini *),
+ int (*freeses)(u_int64_t), int (*process)(struct cryptop *))
{
if ((driverid >= crypto_drivers_num) || (alg <= 0) ||
(alg > CRYPTO_ALGORITHM_MAX) || (crypto_drivers == NULL))
@@ -222,12 +223,9 @@ crypto_register(u_int32_t driverid, int alg, void *newses, void *freeses,
if (crypto_drivers[driverid].cc_process == NULL)
{
- crypto_drivers[driverid].cc_newsession =
- (int (*) (u_int32_t *, struct cryptoini *)) newses;
- crypto_drivers[driverid].cc_process =
- (int (*) (struct cryptop *)) process;
- crypto_drivers[driverid].cc_freesession =
- (int (*) (u_int64_t)) freeses;
+ crypto_drivers[driverid].cc_newsession = newses;
+ crypto_drivers[driverid].cc_process = process;
+ crypto_drivers[driverid].cc_freesession = freeses;
}
return 0;
diff --git a/sys/crypto/crypto.h b/sys/crypto/crypto.h
index b46433a6029..0b1459fa425 100644
--- a/sys/crypto/crypto.h
+++ b/sys/crypto/crypto.h
@@ -153,7 +153,9 @@ struct cryptocap
extern int crypto_newsession(u_int64_t *, struct cryptoini *);
extern int crypto_freesession(u_int64_t);
extern int crypto_dispatch(struct cryptop *);
-extern int crypto_register(u_int32_t, int, void *, void *, void *);
+extern int crypto_register(u_int32_t, int,
+ int (*)(u_int32_t *, struct cryptoini *), int (*)(u_int64_t),
+ int (*)(struct cryptop *));
extern int crypto_unregister(u_int32_t, int);
extern int32_t crypto_get_driverid(void);