summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrisk%netscape.com <devnull@localhost>2000-06-21 00:04:38 +0000
committerchrisk%netscape.com <devnull@localhost>2000-06-21 00:04:38 +0000
commitc83b1120ec0709d7f9f8a483805e8c4fd0581ae7 (patch)
treee73ff4cf6fb8c5179242cc99da272385c16db17a
parentf5195db11b44e824da2b0619894d62d9da344738 (diff)
downloadnss-hg-c83b1120ec0709d7f9f8a483805e8c4fd0581ae7.tar.gz
Oops - fixed the fix. The prototype now correctly unpacks into a
DHPublicKey structure.
-rw-r--r--security/nss/lib/cryptohi/seckey.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/security/nss/lib/cryptohi/seckey.c b/security/nss/lib/cryptohi/seckey.c
index 1a2e5deba..8262ad159 100644
--- a/security/nss/lib/cryptohi/seckey.c
+++ b/security/nss/lib/cryptohi/seckey.c
@@ -89,10 +89,9 @@ const SEC_ASN1Template SECKEY_DHPublicKeyTemplate[] = {
};
const SEC_ASN1Template SECKEY_DHParamKeyTemplate[] = {
- { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(PQGParams) },
- { SEC_ASN1_INTEGER, offsetof(PQGParams,prime), },
- { SEC_ASN1_INTEGER, offsetof(PQGParams,subPrime), },
- { SEC_ASN1_INTEGER, offsetof(PQGParams,base), },
+ { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(SECKEYPublicKey) },
+ { SEC_ASN1_INTEGER, offsetof(SECKEYPublicKey,u.dh.prime), },
+ { SEC_ASN1_INTEGER, offsetof(SECKEYPublicKey,u.dh.base), },
/* XXX chrisk: this needs to be expanded for decoding of j and validationParms (RFC2459 7.3.2) */
{ SEC_ASN1_SKIP_REST },
{ 0, }
@@ -867,8 +866,7 @@ seckey_ExtractPublicKey(CERTSubjectPublicKeyInfo *spki)
rv = SEC_ASN1DecodeItem(arena, pubk, SECKEY_DHPublicKeyTemplate, &os);
if (rv != SECSuccess) break;
- rv = SEC_ASN1DecodeItem(arena, &pubk->u.dh,
- SECKEY_DHParamKeyTemplate,
+ rv = SEC_ASN1DecodeItem(arena, pubk, SECKEY_DHParamKeyTemplate,
&spki->algorithm.parameters);
if (rv == SECSuccess) return pubk;