summaryrefslogtreecommitdiff
path: root/sys/crypto/crypto.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2000-12-13 08:34:06 +0000
committerNiels Provos <provos@cvs.openbsd.org>2000-12-13 08:34:06 +0000
commit6298d4678416da3028892aeca10088326f860948 (patch)
tree8212796660cec21fdcb3c85fcc0c99f2711a1bbf /sys/crypto/crypto.c
parenta6d97c33ffbec1f2b03a30a71a5dc2597d2a7541 (diff)
make the 31-bit code work on 32-bit machines.
Diffstat (limited to 'sys/crypto/crypto.c')
-rw-r--r--sys/crypto/crypto.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/crypto/crypto.c b/sys/crypto/crypto.c
index 57fa0b3be58..03b642fe32e 100644
--- a/sys/crypto/crypto.c
+++ b/sys/crypto/crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crypto.c,v 1.14 2000/09/07 18:44:29 deraadt Exp $ */
+/* $OpenBSD: crypto.c,v 1.15 2000/12/13 08:34:05 provos Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
@@ -106,7 +106,7 @@ crypto_newsession(u_int64_t *sid, struct cryptoini *cri)
if (err == 0)
{
(*sid) = hid;
- (*sid) <<= 31;
+ (*sid) <<= 32;
(*sid) |= (lid & 0xffffffff);
crypto_drivers[hid].cc_sessions++;
}
@@ -128,7 +128,7 @@ crypto_freesession(u_int64_t sid)
return EINVAL;
/* Determine two IDs */
- hid = (sid >> 31) & 0xffffffff;
+ hid = (sid >> 32) & 0xffffffff;
if (hid >= crypto_drivers_num)
return ENOENT;
@@ -317,7 +317,7 @@ crypto_invoke(struct cryptop *crp)
return 0;
}
- hid = (crp->crp_sid >> 31) & 0xffffffff;
+ hid = (crp->crp_sid >> 32) & 0xffffffff;
if (hid >= crypto_drivers_num)
{