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

List:       kde-commits
Subject:    branch-1-1: kdeextragear-3/pwmanager/pwmanager
From:       Michael Buesch <mbuesch () freenet ! de>
Date:       2005-03-16 9:17:48
Message-ID: 20050316091748.C687016F45 () office ! kde ! org
[Download RAW message or body]

CVS commit by mbuesch: 

fix no-smartcard message


  M +5 -1      pwmdoc.cpp   1.1.1.1.2.5.2.3
  M +12 -0     pwmdocui.cpp   1.1.1.1.2.4.2.6
  M +1 -0      pwmexception.h   1.1.1.1.4.1


--- kdeextragear-3/pwmanager/pwmanager/pwmdoc.cpp  #1.1.1.1.2.5.2.2:1.1.1.1.2.5.2.3
@@ -465,5 +465,6 @@ PwMerror PwMDoc::openDoc(const QString *
                 } else if (ret == e_noPw ||
                            ret == e_fileVer ||
-                           ret == e_fileFormat) {
+                           ret == e_fileFormat ||
+                           ret == e_keyNotImpl) {
                         return ret;
                 } else
@@ -597,4 +598,7 @@ PwMerror PwMDoc::checkHeader(char *crypt
                  */
                 return e_noPw;
+        } else if (err == MasterKey::type_notimpl) {
+                PWM_ASSERT(masterKeyType == MasterKey::type_smartcard);
+                return e_keyNotImpl;
         } else if (err != MasterKey::type_ok)
                 PWM_ASSERT(false);

--- kdeextragear-3/pwmanager/pwmanager/pwmdocui.cpp  #1.1.1.1.2.4.2.5:1.1.1.1.2.4.2.6
@@ -243,4 +243,16 @@ bool PwMDocUi::openDocUi(PwMDoc *doc,
                                 goto cancelOpen;
                         }
+                        if (ret == e_keyNotImpl) {
+                                KMessageBox::error(getCurrentView(),
+                                                   i18n
+                                                   ("No SmartCard support available.\n"
+                                                    "This file is encrypted with a SmartCard "
+                                                    "as MasterKey, but this version of PwManager "
+                                                    "does not have SmartCard support. You need "
+                                                    "to recompile PwManager with SmartCard support."),
+                                                   i18n
+                                                   ("No SmartCard Support"));
+                                goto cancelOpen;
+                        }
                 }
                 break;

--- kdeextragear-3/pwmanager/pwmanager/pwmexception.h  #1.1.1.1:1.1.1.1.4.1
@@ -134,4 +134,5 @@ enum PwMerror {
         e_hashNotImpl,
         e_cryptNotImpl,
+        e_keyNotImpl,
 
         // argument/parameter errors


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

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