Bug 1383072, certutil -L should display initialized/uninitialized state of the database, r=rrelyea
authorKai Engert <kaie@kuix.de>
Fri, 25 Aug 2017 20:04:48 +0200
changeset 13549 8cb110cb39eb003816c654c6f6ce93541f43b6e8
parent 13548 83861f1869a511aad77a56371db8f349ab295efb
child 13550 37cc4e60403e02d6066b4b83bd76af91a8960f5a
push id2340
push userkaie@kuix.de
push dateFri, 25 Aug 2017 18:04:37 +0000
reviewersrrelyea
bugs1383072
Bug 1383072, certutil -L should display initialized/uninitialized state of the database, r=rrelyea
cmd/certutil/certutil.c
--- a/cmd/certutil/certutil.c
+++ b/cmd/certutil/certutil.c
@@ -586,16 +586,20 @@ listCerts(CERTCertDBHandle *handle, char
 static SECStatus
 ListCerts(CERTCertDBHandle *handle, char *nickname, char *email,
           PK11SlotInfo *slot, PRBool raw, PRBool ascii,
           SECItem *extensionOID,
           PRFileDesc *outfile, secuPWData *pwdata)
 {
     SECStatus rv;
 
+    if (slot && PK11_NeedUserInit(slot)) {
+        printf("\nDatabase needs user init\n");
+    }
+
     if (!ascii && !raw && !nickname && !email) {
         PR_fprintf(outfile, "\n%-60s %-5s\n%-60s %-5s\n\n",
                    "Certificate Nickname", "Trust Attributes", "",
                    "SSL,S/MIME,JAR/XPI");
     }
     if (slot == NULL) {
         CERTCertList *list;
         CERTCertListNode *node;