aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpg/t-keylist.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-02-04 09:51:43 +0000
committerWerner Koch <[email protected]>2009-02-04 09:51:43 +0000
commit259cbefd5c5d9fbd2ea3c3cd0b2a7d60af81c52b (patch)
tree799e08043730bc4ec162b38c61ea08135119b3a2 /tests/gpg/t-keylist.c
parentFirst take on the low-level assuan interface. (diff)
downloadgpgme-259cbefd5c5d9fbd2ea3c3cd0b2a7d60af81c52b.tar.gz
gpgme-259cbefd5c5d9fbd2ea3c3cd0b2a7d60af81c52b.zip
Provide inforation about smartcards.
Diffstat (limited to 'tests/gpg/t-keylist.c')
-rw-r--r--tests/gpg/t-keylist.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/gpg/t-keylist.c b/tests/gpg/t-keylist.c
index c8c71d0c..e536b47a 100644
--- a/tests/gpg/t-keylist.c
+++ b/tests/gpg/t-keylist.c
@@ -270,6 +270,16 @@ main (int argc, char **argv)
fprintf (stderr, "Primary key unexpectedly secret\n");
exit (1);
}
+ if (key->subkeys->is_cardkey)
+ {
+ fprintf (stderr, "Public key marked as card key\n");
+ exit (1);
+ }
+ if (key->subkeys->card_number)
+ {
+ fprintf (stderr, "Public key with card number set\n");
+ exit (1);
+ }
if (key->subkeys->pubkey_algo != GPGME_PK_DSA)
{
fprintf (stderr, "Primary key has unexpected public key algo: %s\n",
@@ -342,6 +352,16 @@ main (int argc, char **argv)
fprintf (stderr, "Secondary key unexpectedly secret\n");
exit (1);
}
+ if (key->subkeys->next->is_cardkey)
+ {
+ fprintf (stderr, "Secondary public key marked as card key\n");
+ exit (1);
+ }
+ if (key->subkeys->next->card_number)
+ {
+ fprintf (stderr, "Secondary public key with card number set\n");
+ exit (1);
+ }
if (key->subkeys->next->pubkey_algo != GPGME_PK_ELG_E)
{
fprintf (stderr, "Secondary key has unexpected public key algo: %s\n",