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

List:       kde-commits
Subject:    extragear/office/skrooge
From:       Stephane Mankowski <stephane () mankowski ! fr>
Date:       2010-06-07 7:55:29
Message-ID: 20100607075529.441A2AC8CD () svn ! kde ! org
[Download RAW message or body]

SVN commit 1135403 by smankowski:

BUG: 240640: Skrooge crash after password entered - input file DELETED at failure 

 M  +1 -0      CHANGELOG  
 M  +11 -3     skgbasemodeler/skgservices.cpp  


--- trunk/extragear/office/skrooge/CHANGELOG #1135402:1135403
@@ -3,6 +3,7 @@
   *Correction bug 238087: kAmountEdit widget in Operations plugin isn't properly \
                localized
   *Correction bug 238477: Can't open base if partition is full 
   *Correction bug 240600: Skrooge must be able to export as a sqlite database 
+  *Correction bug 240640: Skrooge crash after password entered - input file DELETED \
                at failure 
   *Correction: Drag & drop of categories
   *Correction: Import skg file with tracker or interest simulation
   *Correction: No XML export of tables sqlite_sequence and sqlite_stat1
--- trunk/extragear/office/skrooge/skgbasemodeler/skgservices.cpp #1135402:1135403
@@ -528,7 +528,14 @@
     SKGTRACEL(10) << "Input parameter [iHeaderFile]=[" << iHeaderFile << ']' << \
endl;  
     QCA::Initializer init;
-
+    if (!QCA::isSupported("aes128-ecb"))
+    {
+        //Set error message
+        err.setReturnCode(ERR_WRITEACCESS); //To avoid password request
+        err.setMessage(i18nc("An error message", "AES128 encryption is not \
supported. Please install libqca2-plugin-ossl")); +    }
+    else
+    {
     // Create a random key - you'd probably use one from another
     // source in a real application
     QCA::SymmetricKey key(QByteArray("skrooge"));
@@ -568,7 +575,7 @@
                 u= cipher.update(input);
 
                 // We need to check if that update() call worked.
-                if (!cipher.ok()) err=SKGError(ERR_FAIL, i18nc("Error message", \
"Encryption failed")); +                    if (!cipher.ok()) \
err=SKGError(ERR_WRITEACCESS, i18nc("Error message", "Encryption failed"));  }
 
             // output the results of that stage
@@ -590,7 +597,7 @@
                         QCA::SecureArray f = cipher.final();
 
                         // Check if the final() call worked
-                        if (!cipher.ok()) err=SKGError(ERR_FAIL, i18nc("Error \
message", "Encryption failed")); +                            if (!cipher.ok()) \
err=SKGError(ERR_WRITEACCESS, i18nc("Error message", "Encryption failed"));  
                         // and output the resulting block. The ciphertext is the \
results of update()  // and the result of final()
@@ -606,6 +613,7 @@
     }
 
     KIO::NetAccess::removeTempFile(iFileSourceTmp);
+    }
     return err;
 }
 


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

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