Patch by Ingo Kloecker: bugfix for the gpg support for badly signed messages

svn path=/trunk/kdenetwork/kmail/; revision=72477
wilder-work
Andreas Gungl 26 years ago
parent ce0866fa38
commit 4ef3ca795e
  1. 9
      kpgpbase.cpp

@ -52,9 +52,14 @@ KpgpBase::writeConfig(bool sync)
bool
KpgpBase::setMessage(const QString mess)
{
int index;
clear();
input = mess;
if(input.find("-----BEGIN PGP") != -1) {
// "-----BEGIN PGP" must be at the beginning of a line
if(((index = input.find("-----BEGIN PGP")) != -1) &&
((index == 0) || (input[index-1] == '\n'))) {
decrypt();
return true;
}
@ -569,7 +574,7 @@ KpgpBaseG::decrypt(const char *passphrase)
index = info.find("key ID ",index2);
signatureID = info.mid(index+7,8);
}
else if( info.find("CRC error") != -1 )
else if( info.find("BAD signature") != -1 )
{
//kdDebug() << "BAD signature" << endl;
status |= SIGNED;

Loading…
Cancel
Save