Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29199 - KMail complains "signed with unknown key" when configured not to use any encryption
Summary: KMail complains "signed with unknown key" when configured not to use any encr...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-20 09:18 UTC by Ian Goldby
Modified: 2003-09-21 05:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch reproduced in description (kmreaderwin.patch,955 bytes, patch)
2003-09-20 09:20 UTC, Ian Goldby
Details | Diff
Patch reproduced in description (kmreaderwin.patch,955 bytes, patch)
2003-09-20 09:20 UTC, Ian Goldby
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Goldby 2003-09-20 09:18:39 UTC
When KMail 1.5.3 (using KDE 3.1.3) receives a PGP signed email and 
the encryption tool in 
 
  Configure:Security:OpenPGP:Select encryption tool to use 
 
is set to "Don't use any encryption tool", then KMail displays the 
message in a coloured box with the following warning at the top: 
 
Message was signed with unknown key. 
The validity of the signature cannot be verified. 
Problem: OpenPGP plug-in was not specified. 
Use the 'Settings->Configure KMail->Security' dialogue to specify the 
plug-in or ask your system administrator to do that for you. 
 
To configure KMail not to use any encryption tool in my view implies 
that the user is not interested in whether messages are signed or not, 
and so KMail should not display this warning. 

Reproducible: Always
Steps to Reproduce:
1. Configure KMail not to use any encryption tool in 
"Configure:Security:OpenPGP:Select encryption tool to use" 
2. Receive a PGP signed message and view it (e.g. Gentoo Weekly News) 
Actual Results:  
Message is shown in a highlighted box with the aforementioned warning. 

Expected Results:  
Message should display normally. User is not interested in knowing if it is 
signed or not or whether the signature is valid. 

I've created a patch that queries whether KMail is configured to use PGP. If 
not, it skips the section where it puts the message in a highlighted box with 
a warning. This patch is probably not 100% correct though. Since KMail uses 
plugins, it may be that some plugin other than FreePGP is responsible for 
encryption. So testing Kpgp::Module::getKpgp()->usePGP() may not be generic 
enough. I'm not sure myself. Works for me though. 
 
Here's the patch: 
 
*** kmreaderwin.cpp	2003-09-20 16:48:54.000000000 +0100 
--- temp.cpp	2003-09-20 17:00:15.000000000 +0100 
*************** 
*** 2965,2969 **** 
      else 
      { 
!       if( reader ) { 
          if( cryptPlug ) 
            reader->queueHtml( reader->writeSigstatHeader( messagePart, 
--- 2965,2969 ---- 
      else 
      { 
!       if( reader && Kpgp::Module::getKpgp()->usePGP() ) { 
          if( cryptPlug ) 
            reader->queueHtml( reader->writeSigstatHeader( messagePart, 
*************** 
*** 3040,3044 **** 
                         cryptPlug, 
                         data ); 
!       if( reader ) { 
          if( cryptPlug ) 
            reader->queueHtml( reader->writeSigstatFooter( messagePart ) ); 
--- 3040,3044 ---- 
                         cryptPlug, 
                         data ); 
!       if( reader && Kpgp::Module::getKpgp()->usePGP() ) { 
          if( cryptPlug ) 
            reader->queueHtml( reader->writeSigstatFooter( messagePart ) );
Comment 1 Ian Goldby 2003-09-20 09:20:04 UTC
Created attachment 18036 [details, diff]
Patch reproduced in description

I've attached the patch as a file to preserve the formatting.
Comment 2 Ian Goldby 2003-09-20 09:20:33 UTC
Created attachment 18037 [details, diff]
Patch reproduced in description

I've attached the patch as a file to preserve the formatting.
Comment 3 Paul de Vrieze (RETIRED) gentoo-dev 2003-09-21 05:33:56 UTC
The way to make things work is to configure the plugin. You can better submit the patch to the kmail developers. This is mainly an upstream problem. Also your patch does not solve the problem correctly. The way to go would be to have an option to disable the warnings, independent of the internal pgp support (Yes it is possible to use the pgp plugin without having the internal pgp enabled)