diff options
Diffstat (limited to 'chat/psi/patches')
-rw-r--r-- | chat/psi/patches/patch-aa | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/chat/psi/patches/patch-aa b/chat/psi/patches/patch-aa new file mode 100644 index 00000000000..b216ce11b4e --- /dev/null +++ b/chat/psi/patches/patch-aa @@ -0,0 +1,62 @@ +$NetBSD: patch-aa,v 1.3 2003/11/18 17:54:48 xtraeme Exp $ + +Patch from Martin Ehmsen to make psi work with gpg-1.2.3 (and +versions before that). + +--- cutestuff/openpgp/gpgop.cpp 2003-05-26 19:40:28.000000000 +0200 ++++ cutestuff/openpgp/gpgop.cpp 2003-08-28 00:20:59.000000000 +0200 +@@ -543,18 +543,33 @@ + return false; + + QStringList::ConstIterator it = lines.begin(); ++ QString keyring; ++ int ver = 0; + +- // first line is keyring file +- QString keyring = *(it++); +- +- // skip past the divider ++ // check if gnupg version is 1.2.3 or below + for(; it != lines.end(); ++it) { +- if((*it).at(0) == '-') +- break; ++ if((*it).at(0) == '-') { ++ ver = 1; ++ break; ++ } ++ } ++ ++ it = lines.begin(); ++ ++ // if gnupg version is 1.2.2 and below first line is keyring ++ if(ver) { ++ // first line is keyring file ++ keyring = *(it++); ++ ++ // skip past the divider ++ for(; it != lines.end(); ++it) { ++ if((*it).at(0) == '-') ++ break; ++ } ++ if(it == lines.end()) ++ return false; ++ ++it; + } +- if(it == lines.end()) +- return false; +- ++it; + + OpenPGP::Key *k = 0; + for(; it != lines.end(); ++it) { +@@ -620,8 +635,9 @@ + + if(_keylist) + *_keylist = keyList; +- if(_keyring) +- *_keyring = keyring; ++ if(ver) ++ if(_keyring) ++ *_keyring = keyring; + + return true; + } |