diff options
author | Werner Koch <[email protected]> | 2003-07-03 18:08:16 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2003-07-03 18:08:16 +0000 |
commit | 1753a2f3b0ec8c1eda54d9de7b17fa62c43fef39 (patch) | |
tree | ec11dfed93129b924a14e921ea110ddcc7506d64 /g10/seckey-cert.c | |
parent | * app-openpgp.c (store_fpr): Fixed fingerprint calculation. (diff) | |
download | gnupg-1753a2f3b0ec8c1eda54d9de7b17fa62c43fef39.tar.gz gnupg-1753a2f3b0ec8c1eda54d9de7b17fa62c43fef39.zip |
* options.h (DBG_CIPHER): Reintroduced it.
* seskey.c (encode_session_key): Debug output of the session key.
* pubkey-enc.c (get_it): Handle card case.
* call-agent.c (agent_scd_pkdecrypt): New.
* pkglue.c (pk_encrypt): Add RSA support.
* g10.c (main): Default to --use-agent.
* keygen.c (show_smartcard): Print info about the public key.
(check_smartcard): Check for existing key here.
(gen_card_key): And not anymore here.
(fpr_is_zero): New.
(generate_keypair): Generate both keys for a card.
(smartcard_change_url): Nw.
Diffstat (limited to 'g10/seckey-cert.c')
-rw-r--r-- | g10/seckey-cert.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/g10/seckey-cert.c b/g10/seckey-cert.c index dff463c53..65be7a468 100644 --- a/g10/seckey-cert.c +++ b/g10/seckey-cert.c @@ -297,11 +297,14 @@ check_secret_key( PKT_secret_key *sk, int n ) /**************** * check whether the secret key is protected. * Returns: 0 not protected, -1 on error or the protection algorithm + * -2 indicates a card stub. */ int is_secret_key_protected( PKT_secret_key *sk ) { - return sk->is_protected? sk->protect.algo : 0; + return sk->is_protected? + sk->protect.s2k.mode == 1002? -2 + : sk->protect.algo : 0; } |