Blame SOURCES/nss-certutil-suppress-password.patch

74fc46
# HG changeset patch
74fc46
# User Daiki Ueno <dueno@redhat.com>
74fc46
# Date 1513770602 -3600
74fc46
#      Wed Dec 20 12:50:02 2017 +0100
74fc46
# Node ID 29b2a346746fb03316cf97c8c7b0837b714c255b
74fc46
# Parent  5a14f42384eb22b67e0465949c03555eff41e4af
74fc46
Bug 1426361, certutil: check CKF_LOGIN_REQUIRED as well as CKF_USER_PIN_INITIALIZED, r=rrelyea
74fc46
74fc46
diff --git a/cmd/certutil/certutil.c b/cmd/certutil/certutil.c
74fc46
--- a/cmd/certutil/certutil.c
74fc46
+++ b/cmd/certutil/certutil.c
74fc46
@@ -3171,7 +3171,7 @@ certutil_main(int argc, char **argv, PRB
74fc46
         certutil.commands[cmd_CreateAndAddCert].activated ||
74fc46
         certutil.commands[cmd_AddCert].activated ||
74fc46
         certutil.commands[cmd_AddEmailCert].activated) {
74fc46
-        if (PK11_NeedUserInit(slot)) {
74fc46
+        if (PK11_NeedLogin(slot) && PK11_NeedUserInit(slot)) {
74fc46
             char *password = NULL;
74fc46
             /* fetch the password from the command line or the file
74fc46
              * if no password is supplied, initialize the password to NULL */