[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-utils-devel
Subject:    Re: [KGpg SoC] Status Report - June 1 2018
From:       Rolf Eike Beer <kde () opensource ! sf-tec ! de>
Date:       2018-06-02 11:57:49
Message-ID: 5383743.ig5hhhYkQs () daneel ! sf-tec ! de
[Download RAW message or body]


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
["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic