[KGpg SoC] Status Report - June 1 2018

Rolf Eike Beer kde at opensource.sf-tec.de
Sat Jun 2 11:57:49 UTC 2018


Harindu Dilshan wrote:
> I created tests for KGpgAddUid and KGpgExport.

Here a couple of review note, not only for those:

-you should also check for the "--END PGP MESSAGE" just out of paranoia 
-and the check for keyid hidden is not that simple, the key id is not printed 
in clear text in the message. you would have to decode the raw gpg stream to 
see if there are any keyid hints
-the DelKeyTest could tell the root node to just read all keys from the 
keyring instead of creating the the key node by hand
-I would like to hear what is going wrong in the DeletePrivateKey test, 
especially if you switched to letting RootNode list the nodes itself
-the DelKey tests look as if they could be data driven if the additional "--
yes" does not hurt for deleting a pub key only (which should work)
-please insert an empty line between the include guard and the first #include 
for better readability
-in AddUid you should do QCOMPARE(key.name(), name) instead of ".compare() == 
0", they should be identical even with the casing and you will get better 
error messages otherwise

> I have no idea how to extract uids from readPublicKeys(), can you give
> me a hint?

Look into KGpgRootNode. Basically you could just call 
KGpgRootNode::addKeys(id) and it would do all the work for you, and just 
inspect the childs of the root node afterwards.

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20180602/1a5c9d11/attachment.sig>


More information about the Kde-utils-devel mailing list