summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicolson%netscape.com <devnull@localhost>2002-09-27 00:01:53 +0000
committernicolson%netscape.com <devnull@localhost>2002-09-27 00:01:53 +0000
commitfcb2b043e8f7af5ad4f57597fd17010fb8ea04b6 (patch)
treea3adcbb3a110f665256472ab1b211bde55f11734
parentb91c104635539799e59995c15d4c9ff8e795e2fa (diff)
downloadnss-hg-fcb2b043e8f7af5ad4f57597fd17010fb8ea04b6.tar.gz
Fix 169798: Failed to install ca signing certificate with NS3.6beta.
r=wtc
-rw-r--r--security/nss/lib/certhigh/certhigh.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/security/nss/lib/certhigh/certhigh.c b/security/nss/lib/certhigh/certhigh.c
index 6be6a7017..9e1278a60 100644
--- a/security/nss/lib/certhigh/certhigh.c
+++ b/security/nss/lib/certhigh/certhigh.c
@@ -890,14 +890,19 @@ cert_ImportCAChain(SECItem *certs, int numcerts, SECCertUsage certUsage, PRBool
goto loser;
}
- /* get a default nickname for it */
- nickname = CERT_MakeCANickname(cert);
+ /* if the cert is temp, make it perm; otherwise we're done */
+ if (cert->istemp) {
+ /* get a default nickname for it */
+ nickname = CERT_MakeCANickname(cert);
- rv = CERT_AddTempCertToPerm(cert, nickname, &trust);
+ rv = CERT_AddTempCertToPerm(cert, nickname, &trust);
- /* free the nickname */
- if ( nickname ) {
- PORT_Free(nickname);
+ /* free the nickname */
+ if ( nickname ) {
+ PORT_Free(nickname);
+ }
+ } else {
+ rv = SECSuccess;
}
CERT_DestroyCertificate(cert);