diff options
author | Robert Relyea <rrelyea@redhat.com> | 2018-05-02 15:46:29 +0200 |
---|---|---|
committer | Robert Relyea <rrelyea@redhat.com> | 2018-05-02 15:46:29 +0200 |
commit | fb488b42ed6a6c7344e952d522caec55487360d5 (patch) | |
tree | c5aeca28f86b3a859d433b8ee51307a2b90d5d11 /lib/dev | |
parent | 5201ddf778e3b872d04d2ae52735a6cac90019ce (diff) | |
download | nss-hg-fb488b42ed6a6c7344e952d522caec55487360d5.tar.gz |
Bug 1458518, Nicknames of existing certificates in NSS SQL DB should remain unchanged on repeated import attempts, r=kaie
Diffstat (limited to 'lib/dev')
-rw-r--r-- | lib/dev/devtoken.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/dev/devtoken.c b/lib/dev/devtoken.c index 0d4c3b5a7..41ffe86da 100644 --- a/lib/dev/devtoken.c +++ b/lib/dev/devtoken.c @@ -528,7 +528,9 @@ nssToken_ImportCertificate( */ NSS_CK_TEMPLATE_START(cert_tmpl, attr, ctsize); NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_ID, id); - NSS_CK_SET_ATTRIBUTE_UTF8(attr, CKA_LABEL, nickname); + if (!rvObject->label && nickname) { + NSS_CK_SET_ATTRIBUTE_UTF8(attr, CKA_LABEL, nickname); + } NSS_CK_TEMPLATE_FINISH(cert_tmpl, attr, ctsize); /* reset the mutable attributes on the token */ nssCKObject_SetAttributes(rvObject->handle, |