I upgraded to stretch and testing 14.1 (DEV) Unfortunately when trying to send a gpg signed message today I realized that gpg is not working properly. I started from command line and saw message gpg2 migration successfull. I also see a file .gpg-v21-migrated
When I start kgpg from command line it shows many line with invalid date. Gpg however lists all keys with properly displayed date. Kgpg does not display date or name assigned to key. I managed to find out that the date in the key is a unix timestamp, but in kgpg we have TQDate fromString with QT:ISODate, which forces fromString to split the string instead using it as unix time stamp.
I did following to fix it
if (ret.gpgkeyexpiration.isEmpty()) ret.gpgkeyexpiration=i18n("Unlimited"); else { TQDate date = TQDate::fromString(ret.gpgkeyexpiration, Qt::ISODate); if (!date.isValid()) { TQDateTime timestamp; timestamp.setTime_t(ret.gpgkeycreation.toInt()); date = timestamp.date(); }
However I need to look into why the names are not shown properly. Perhaps we'll get a patch
Can you confirm this?
I created a Bug 2791
regards
deloptes wrote:
Sorry there was a copy paste error
this is in listkeys.cpp
ret.gpgkeysize=keyString[2]; ret.gpgkeycreation=keyString[5]; if(!ret.gpgkeycreation.isEmpty()) { kdDebug(2100) << "keyCreated: " << ret.gpgkeycreation<<endl; TQDate date = TQDate::fromString(ret.gpgkeycreation, Qt::ISODate); if (!date.isValid()) { TQDateTime timestamp; timestamp.setTime_t( ret.gpgkeycreation.toInt()); date = timestamp.date(); } kdDebug(2100) << "extractKey1: " << date<<endl; ret.gpgkeycreation=TDEGlobal::locale()->formatDate(date, true); kdDebug(2100) << "gpgkeycreation1: " << ret.gpgkeycreation<<endl; } TQString tid=keyString[4]; ret.gpgkeyid=TQString("0x"+tid.right(8)); ret.gpgkeyexpiration=keyString[6]; if (ret.gpgkeyexpiration.isEmpty()) ret.gpgkeyexpiration=i18n("Unlimited"); else { TQDate date = TQDate::fromString(ret.gpgkeyexpiration, Qt::ISODate); if (!date.isValid()) { TQDateTime timestamp; timestamp.setTime_t(ret.gpgkeyexpiration.toInt()); date = timestamp.date(); } kdDebug(2100) << "extractKey2: " << date<<endl; ret.gpgkeyexpiration=TDEGlobal::locale()->formatDate(date, true); kdDebug(2100) << "gpgkeyexpiration2: " << ret.gpgkeyexpiration<<endl; }
regards
deloptes wrote:
I upgraded to stretch and testing 14.1 (DEV) Unfortunately when trying to send a gpg signed message today I realized that gpg is not working properly. I started from command line and saw message gpg2 migration successfull. I also see a file .gpg-v21-migrated
No one is writing back. I'll post my findings to the bug I opened. It looks like gpg problem as in jessie version is 1.4.18 and in stretch version is 2.1.18.
The time format and who knows what else changed. It looks like a major fix to kgpg is required and it looks like we need to provide intelligent version dependent solution to the problem. The stupid thing is kgpg is not really/100% usable in stretch now.
regards
deloptes wrote:
Can you confirm this?
I created a Bug 2791
I added a patch to bug 2791. I also had a look into all related bugs and had a discussion with Kristopher.
We could close some of them as they are user setup related:
630 tdepim NEW --- KMail issue with gpg keys 2016-05-20 - USER /SETUP RELATED - when key is not signed and trusted kmail/kgpg rejects to accept it
1090 tdepim NEW --- KGPG showing two default keyservers 2013-02-25 - this is OK and can be improved, but is really minor
1183 tdeutils NEW --- KGPG not recognizing gpg-agent process 2013-02-25 - USER /SETUP RELATED
2518 tdeutils NEW --- KGPG not displaying keys when signing files 07:21:08 - CAN CLOSE with 2791
2672 tdepim NEW --- [Enhancement Request] KMail: Do signing and decrypting through KGPG 00:32:57 - not sure if it is not easier to port pinentry-qt to TDE rather integrating it into Kgpg
2791 tdeutils NEW --- kgpg and key dates 07:21:50 - CAN CLOSE - patch provided, please test
you would have 1090 and 2672 left
Hi,
perhaps someone could give an advise here on how to proceed further
Look at https://bugs.trinitydesktop.org/show_bug.cgi?id=2791#c7