Detect empty emailAddr strings in CERTCertificate. Bugzilla bug 211540.

git-svn-id: svn://10.0.0.236/trunk@149333 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
nelsonb%netscape.com
2003-11-15 00:15:28 +00:00
parent ce4070ff8f
commit 268f8a9402

View File

@@ -1681,7 +1681,7 @@ PK11_ImportCert(PK11SlotInfo *slot, CERTCertificate *cert,
PK11_SETATTRS(attrs,CKA_NETSCAPE_TRUST, certUsage,
sizeof(SECCertUsage));
attrs++;
if (cert->emailAddr) {
if (cert->emailAddr && cert->emailAddr[0]) {
PK11_SETATTRS(attrs,CKA_NETSCAPE_EMAIL, cert->emailAddr,
PORT_Strlen(cert->emailAddr);
attrs++;
@@ -1765,7 +1765,7 @@ done:
goto loser;
}
if (PK11_IsInternal(slot) && cert->emailAddr) {
if (PK11_IsInternal(slot) && cert->emailAddr && cert->emailAddr[0]) {
emailAddr = cert->emailAddr;
}