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

List:       kde-commits
Subject:    branches/work/kdab-post-4.0/kdepim
From:       Till Adam <adam () kde ! org>
Date:       2007-12-20 15:26:58
Message-ID: 1198164418.932171.26753.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 750923 by tilladam:

Merged revisions 750914 via svnmerge from 
svn+ssh://tilladam@svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim

........
  r750914 | tilladam | 2007-12-20 15:53:16 +0100 (Thu, 20 Dec 2007) | 6 lines
  
  Discern the "encryption failed" case from the "we don't know
  if the bodypart is encrypted, so let's try decrypting, oops, didn't
  work" case.
  
  kolab/issue2183
........


 _M            . (directory)  
 M  +13 -2     kmail/objecttreeparser.cpp  
 M  +1 -0      kmail/objecttreeparser.h  
 M  +0 -1      kontact/plugins/CMakeLists.txt  
 M  +0 -1      kresources/CMakeLists.txt  


** branches/work/kdab-post-4.0/kdepim #property svnmerge-integrated
   - /branches/kdepim/enterprise/kdepim:1-708704,708706,708741,708749,709066,711604,71 \
1623,712056,714358,715112,717162,717727,723348-723367,723653,724153,724155,724546,7293 \
06,729611,731653,733159,733883,734242,734247,734273,735684,738629,739069,739670,743884,744689,747182,747318,747971,748016,748069,748416,750031 \
/trunk/KDE/kdepim:1-738080  + \
/branches/kdepim/enterprise/kdepim:1-708704,708706,708741,708749,709066,711604,711623, \
712056,714358,715112,717162,717727,723348-723367,723653,724153,724155,724546,729306,72 \
9611,731653,733159,733883,734242,734247,734273,735684,738629,739069,739670,743884,744689,747182,747318,747971,748016,748069,748416,750031,750914 \
                /trunk/KDE/kdepim:1-738080
--- branches/work/kdab-post-4.0/kdepim/kmail/objecttreeparser.cpp #750922:750923
@@ -630,6 +630,7 @@
                                       CryptPlug::SignatureMetaData& sigMeta,
                                       bool showWarning,
                                       bool& passphraseError,
+                                      bool& actuallyEncrypted,
                                       QString& aErrorText )
 {
   passphraseError = false;
@@ -718,6 +719,7 @@
                                                        &errTxt );
     kDebug(5006) <<"ObjectTreeParser::decryptMIME: returned from CRYPTPLUG";
     aErrorText = CryptPlugWrapper::errorIdToText( errId, passphraseError );
+    actuallyEncrypted = errId != GPG_ERR_NO_DATA;
     if ( bDecryptionOk )
       decryptedData = cleartext;
     else if ( mReader && showWarning ) {
@@ -1223,6 +1225,7 @@
     sigMeta.extended_info       = 0;
     sigMeta.extended_info_count = 0;
     bool passphraseError;
+    bool actuallyEncrypted = true;
 
     bool bOkDecrypt = okDecryptMIME( *data,
                                      decryptedData,
@@ -1230,6 +1233,7 @@
                                      sigMeta,
                                      true,
                                      passphraseError,
+                                     actuallyEncrypted,
                                      messagePart.errorText );
 
     // paint the frame
@@ -1375,6 +1379,7 @@
         sigMeta.extended_info       = 0;
         sigMeta.extended_info_count = 0;
         bool passphraseError;
+        bool actuallyEncrypted = true;
 
         bool bOkDecrypt = okDecryptMIME( *node,
                                          decryptedData,
@@ -1382,6 +1387,7 @@
                                          sigMeta,
                                          true,
                                          passphraseError,
+                                         actuallyEncrypted,
                                          messagePart.errorText );
 
         // paint the frame
@@ -1537,6 +1543,7 @@
       sigMeta.extended_info       = 0;
       sigMeta.extended_info_count = 0;
       bool passphraseError;
+      bool actuallyEncrypted = true;
 
       if ( okDecryptMIME( *node,
                           decryptedData,
@@ -1544,6 +1551,7 @@
                           sigMeta,
                           false,
                           passphraseError,
+                          actuallyEncrypted,
                           messagePart.errorText ) ) {
         kDebug(5006) <<"pkcs7 mime  -  encryption found  -  enveloped (encrypted) \
data !";  isEncrypted = true;
@@ -1561,8 +1569,11 @@
         if ( mReader )
           htmlWriter()->queue( writeSigstatFooter( messagePart ) );
       } else {
-
-        if ( passphraseError || smimeType.isEmpty() ) {
+          // decryption failed, which could be because the part was encrypted but
+          // decryption failed, or because we didn't know if it was encrypted, \
tried, +          // and failed. If the message was not actually encrypted, we \
continue +          // assuming it's signed
+        if ( passphraseError || ( smimeType.isEmpty() && actuallyEncrypted ) ) {
           isEncrypted = true;
           signTestNode = 0;
         }
--- branches/work/kdab-post-4.0/kdepim/kmail/objecttreeparser.h #750922:750923
@@ -193,6 +193,7 @@
                         CryptPlug::SignatureMetaData& sigMeta,
                         bool showWarning,
                         bool& passphraseError,
+                        bool& notActuallyEncrypted,
                         QString& aErrorText );
 
     bool processMailmanMessage( partNode * node );
--- branches/work/kdab-post-4.0/kdepim/kontact/plugins/CMakeLists.txt #750922:750923
@@ -6,7 +6,6 @@
 endif(NOT WIN32)
 add_subdirectory( korganizer )
 add_subdirectory( summary )
-add_subdirectory( specialdates )
 endif(QGPGME_FOUND)
 add_subdirectory( knotes ) 
 add_subdirectory( knode ) 
--- branches/work/kdab-post-4.0/kdepim/kresources/CMakeLists.txt #750922:750923
@@ -9,6 +9,5 @@
 add_subdirectory( featureplan ) 
 add_subdirectory( groupdav ) 
 add_subdirectory( birthdays ) 
-add_subdirectory( blog )
 #add_subdirectory( groupwise )
 


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

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