summaryrefslogtreecommitdiffstats
path: root/security/nss/lib/dev/devtoken.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/lib/dev/devtoken.c')
-rw-r--r--security/nss/lib/dev/devtoken.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/security/nss/lib/dev/devtoken.c b/security/nss/lib/dev/devtoken.c
index 0d4c3b5a7..41ffe86da 100644
--- a/security/nss/lib/dev/devtoken.c
+++ b/security/nss/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,