summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2002-07-03 00:24:30 +0000
committerJason Wright <jason@cvs.openbsd.org>2002-07-03 00:24:30 +0000
commit2ccb4360c12da604035f2d652c9bf6977c52af4b (patch)
tree4cde2cd4f01f8d9d68e230fe59fb93865f2a61a8 /sys/dev
parent490a250def73fa912efa70f603db5baa762d7cdf (diff)
But when denormalizing we need the normalized length, too as well as the destination length.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/ubsec.c5
-rw-r--r--sys/dev/pci/ubsecvar.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c
index 983c9d01c9b..60c5d2d248e 100644
--- a/sys/dev/pci/ubsec.c
+++ b/sys/dev/pci/ubsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsec.c,v 1.104 2002/07/03 00:19:33 jason Exp $ */
+/* $OpenBSD: ubsec.c,v 1.105 2002/07/03 00:24:29 jason Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@ -1407,7 +1407,7 @@ ubsec_callback2(sc, q)
krp->krp_status = E2BIG;
else
ubsec_kshift_l(me->me_shiftbits,
- me->me_C.dma_vaddr, me->me_modbits,
+ me->me_C.dma_vaddr, me->me_normbits,
krp->krp_param[UBS_MODEXP_PAR_C].crp_p,
krp->krp_param[UBS_MODEXP_PAR_C].crp_nbits);
@@ -1850,6 +1850,7 @@ ubsec_kprocess_modexp(sc, krp)
me->me_modbits = nbits;
me->me_shiftbits = shiftbits;
+ me->me_normbits = normbits;
/* Sanity check: result bits must be >= true modulus bits. */
if (krp->krp_param[UBS_MODEXP_PAR_C].crp_nbits < nbits) {
diff --git a/sys/dev/pci/ubsecvar.h b/sys/dev/pci/ubsecvar.h
index fb861fa5e6d..bd2a46cd952 100644
--- a/sys/dev/pci/ubsecvar.h
+++ b/sys/dev/pci/ubsecvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsecvar.h,v 1.33 2002/05/15 15:15:42 jason Exp $ */
+/* $OpenBSD: ubsecvar.h,v 1.34 2002/07/03 00:24:29 jason Exp $ */
/*
* Copyright (c) 2000 Theo de Raadt
@@ -88,6 +88,7 @@ struct ubsec_q2_modexp {
struct ubsec_dma_alloc me_epb;
int me_modbits;
int me_shiftbits;
+ int me_normbits;
};
#define UBS_RSAPRIV_PAR_P 0