summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-04-23 05:01:54 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-04-23 05:01:54 +0000
commit5f26901cb1d06d6093c5f57ea4b9d7533a9784bd (patch)
tree753c2127581a61e6e02f049550f7589b0a5c70ae /sys
parent01ba575a5c837cc682eeec39e1170084766348b4 (diff)
Change the type of freesession to take u_int64_t as argument.
Diffstat (limited to 'sys')
-rw-r--r--sys/crypto/crypto.c7
-rw-r--r--sys/crypto/crypto.h2
-rw-r--r--sys/crypto/cryptosoft.c3
-rw-r--r--sys/crypto/cryptosoft.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/sys/crypto/crypto.c b/sys/crypto/crypto.c
index c30c50dabb3..d6a4f4cedc0 100644
--- a/sys/crypto/crypto.c
+++ b/sys/crypto/crypto.c
@@ -115,7 +115,7 @@ crypto_newsession(u_int64_t *sid, struct cryptoini *cri)
int
crypto_freesession(u_int64_t sid)
{
- u_int32_t hid, lid;
+ u_int32_t hid;
int err = 0;
if (crypto_drivers == NULL)
@@ -123,7 +123,6 @@ crypto_freesession(u_int64_t sid)
/* Determine two IDs */
hid = (sid >> 31) & 0xffffffff;
- lid = sid & 0xffffffff;
if (hid >= crypto_drivers_num)
return ENOENT;
@@ -133,7 +132,7 @@ crypto_freesession(u_int64_t sid)
/* Call the driver cleanup routine, if available */
if (crypto_drivers[hid].cc_freesession)
- err = crypto_drivers[hid].cc_freesession(lid);
+ err = crypto_drivers[hid].cc_freesession(sid);
/*
* If this was the last session of a driver marked as invalid, make
@@ -228,7 +227,7 @@ crypto_register(u_int32_t driverid, int alg, void *newses, void *freeses,
crypto_drivers[driverid].cc_process =
(int (*) (struct cryptop *)) process;
crypto_drivers[driverid].cc_freesession =
- (int (*) (u_int32_t)) freeses;
+ (int (*) (u_int64_t)) freeses;
}
return 0;
diff --git a/sys/crypto/crypto.h b/sys/crypto/crypto.h
index 9e3d688acab..b46433a6029 100644
--- a/sys/crypto/crypto.h
+++ b/sys/crypto/crypto.h
@@ -145,7 +145,7 @@ struct cryptocap
int (*cc_newsession) (u_int32_t *, struct cryptoini *);
int (*cc_process) (struct cryptop *);
- int (*cc_freesession) (u_int32_t);
+ int (*cc_freesession) (u_int64_t);
};
diff --git a/sys/crypto/cryptosoft.c b/sys/crypto/cryptosoft.c
index 87e5909160a..f68b811aa70 100644
--- a/sys/crypto/cryptosoft.c
+++ b/sys/crypto/cryptosoft.c
@@ -564,11 +564,12 @@ swcr_newsession(u_int32_t *sid, struct cryptoini *cri)
* Free a session.
*/
int
-swcr_freesession(u_int32_t sid)
+swcr_freesession(u_int64_t tid)
{
struct swcr_data *swd;
struct enc_xform *txf;
struct auth_hash *axf;
+ u_int32_t sid = (tid >> 31) & 0xffff;
if ((sid > swcr_sesnum) || (swcr_sessions == NULL) ||
(swcr_sessions[sid] == NULL))
diff --git a/sys/crypto/cryptosoft.h b/sys/crypto/cryptosoft.h
index 459d08530b8..7741f7d1339 100644
--- a/sys/crypto/cryptosoft.h
+++ b/sys/crypto/cryptosoft.h
@@ -62,7 +62,7 @@ extern int swcr_authcompute(struct cryptodesc *, struct swcr_data *,
caddr_t, int);
extern int swcr_process(struct cryptop *);
extern int swcr_newsession(u_int32_t *, struct cryptoini *);
-extern int swcr_freesession(u_int32_t);
+extern int swcr_freesession(u_int64_t);
extern void swcr_init(void);
#endif /* _KERNEL */