From 50098f2c225e86b538bda33b434d0ddd9449f929 Mon Sep 17 00:00:00 2001 From: "nelsonb%netscape.com" Date: Fri, 29 Sep 2000 04:03:34 +0000 Subject: [PATCH] Fix some bugs from the last checkin. --- security/nss/lib/freebl/pqg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/security/nss/lib/freebl/pqg.c b/security/nss/lib/freebl/pqg.c index 9e02b061cab9..6a7845527e55 100644 --- a/security/nss/lib/freebl/pqg.c +++ b/security/nss/lib/freebl/pqg.c @@ -34,7 +34,7 @@ /* * PQG parameter generation/verification. Based on FIPS 186-1. * - * $Id: pqg.c,v 1.4 2000/09/29 02:10:23 mcgreer%netscape.com Exp $ + * $Id: pqg.c,v 1.5 2000/09/29 04:03:34 nelsonb%netscape.com Exp $ */ #include "prerr.h" @@ -320,8 +320,8 @@ makeGfromH(const mp_int *P, /* input. */ CHECK_MPI_OK( mp_init(&exp) ); CHECK_MPI_OK( mp_init(&pm1) ); CHECK_MPI_OK( mp_sub_d(P, 1, &pm1) ); /* P - 1 */ - if ( mp_cmp(&H, &pm1) > 0) /* H = H mod (P-1) */ - CHECK_MPI_OK( mp_sub(&H, &pm1, &H) ); + if ( mp_cmp(H, &pm1) > 0) /* H = H mod (P-1) */ + CHECK_MPI_OK( mp_sub(H, &pm1, H) ); /* Let b = 2**n (smallest power of 2 greater than P). ** Since P-1 >= b/2, and H < b, quotient(H/(P-1)) = 0 or 1 ** so the above operation safely computes H mod (P-1) @@ -572,7 +572,7 @@ PQG_VerifyParams(const PQGParams *params, const PQGVerify *vfy, SECStatus *result) { SECStatus rv = SECSuccess; - SECStatus passed; + int passed; unsigned int g, n, L, offset; mp_int P, Q, G, P_, Q_, G_, r, h; mp_err err = MP_OKAY;