diff options
author | nelsonb%netscape.com <devnull@localhost> | 2004-09-27 22:07:10 +0000 |
---|---|---|
committer | nelsonb%netscape.com <devnull@localhost> | 2004-09-27 22:07:10 +0000 |
commit | 8860819374da8b5970abd1c0637153bc496c7114 (patch) | |
tree | 410652b4c2510bdf252b1c8007b798c9894d9e06 | |
parent | 7f5fee0abcb49b07b9a8e60d07b05077dfdf5adc (diff) | |
download | nss-hg-8860819374da8b5970abd1c0637153bc496c7114.tar.gz |
Fix bugzilla bug 261496. Absent OPTIONAL CHOICEs should not cause fatalNSS_3_9_3_BETA3
errors. Fix printing code to not crash on missing optional nextUpdate.
r=julien.pierre
-rw-r--r-- | security/nss/cmd/lib/secutil.c | 3 | ||||
-rw-r--r-- | security/nss/lib/util/quickder.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/security/nss/cmd/lib/secutil.c b/security/nss/cmd/lib/secutil.c index cb6942b30..033ed98bc 100644 --- a/security/nss/cmd/lib/secutil.c +++ b/security/nss/cmd/lib/secutil.c @@ -2106,7 +2106,8 @@ SECU_PrintCRLInfo(FILE *out, CERTCrl *crl, char *m, int level) level + 1); SECU_PrintName(out, &(crl->name), "Issuer", level + 1); SECU_PrintTimeChoice(out, &(crl->lastUpdate), "This Update", level + 1); - SECU_PrintTimeChoice(out, &(crl->nextUpdate), "Next Update", level + 1); + if (crl->nextUpdate.data && crl->nextUpdate.len) /* is optional */ + SECU_PrintTimeChoice(out, &(crl->nextUpdate), "Next Update", level + 1); if (crl->entries != NULL) { iv = 0; diff --git a/security/nss/lib/util/quickder.c b/security/nss/lib/util/quickder.c index 42acedf5b..c94368f14 100644 --- a/security/nss/lib/util/quickder.c +++ b/security/nss/lib/util/quickder.c @@ -213,8 +213,9 @@ static SECStatus MatchComponentType(const SEC_ASN1Template* templateEntry, return SECSuccess; } } - PORT_SetError(SEC_ERROR_BAD_DER); - return SECFailure; + /* no match, caller must decide if this is BAD DER, or not. */ + *match = PR_FALSE; + return SECSuccess; } if (kind & SEC_ASN1_ANY) |