diff options
author | Werner Koch <[email protected]> | 2009-02-04 09:51:43 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2009-02-04 09:51:43 +0000 |
commit | 259cbefd5c5d9fbd2ea3c3cd0b2a7d60af81c52b (patch) | |
tree | 799e08043730bc4ec162b38c61ea08135119b3a2 /tests | |
parent | First take on the low-level assuan interface. (diff) | |
download | gpgme-259cbefd5c5d9fbd2ea3c3cd0b2a7d60af81c52b.tar.gz gpgme-259cbefd5c5d9fbd2ea3c3cd0b2a7d60af81c52b.zip |
Provide inforation about smartcards.
Diffstat (limited to '')
-rw-r--r-- | tests/ChangeLog | 5 | ||||
-rw-r--r-- | tests/gpg/t-keylist.c | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 1248a8f2..efd756c4 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2009-02-03 Werner Koch <[email protected]> + + * gpg/t-keylist.c (main): Check that new fields is_cardkey and + card_number are not set. + 2009-01-26 Werner Koch <[email protected]> * opassuan/: New. 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", |