[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kcontrol/crypto
From:       George Staikos <staikos () kde ! org>
Date:       2004-11-18 23:04:54
Message-ID: 20041118230454.1965416E01 () office ! kde ! org
[Download RAW message or body]

CVS commit by staikos: 

- sanify some indenting
- allow setting empty passwords for p12 objects
- update the MD5 sum properly
FEATURE: 92556


  M +38 -35    crypto.cpp   1.138


--- kdebase/kcontrol/crypto/crypto.cpp  #1.137:1.138
@@ -1766,4 +1764,5 @@ QString iss;
          yValidFrom->setText(cert->getNotBefore());
          yValidUntil->setText(cert->getNotAfter());
+   yHash->setText(cert->getMD5DigestText());
    yourSSLUnlock->setEnabled(false);
    delete pkcs;
@@ -1839,10 +1838,13 @@ QCString oldpass = "";
 
    if (pkcs) {
-      QCString pass;
       x->setPassCache(oldpass);
       slotYourUnlock();
-      int i = KPasswordDialog::getNewPassword(pass,
-                                   i18n("Enter the new certificate password"));
+      KPasswordDialog *kpd = new KPasswordDialog(KPasswordDialog::NewPassword, false, 0, this);
+      kpd->setPrompt(i18n("Enter the new certificate password"));
+      kpd->setAllowEmptyPasswords(true);
+
+      int i = kpd->exec();
       if (i == KPasswordDialog::Accepted) {
+         QCString pass = kpd->password();
          pkcs->changePassword(QString(oldpass), QString(pass));
          x->setPKCS(pkcs->toString());
@@ -1850,4 +1852,5 @@ QCString oldpass = "";
          configChanged();
       }
+      delete kpd;
       delete pkcs;
    }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic