diff options
author | Werner Koch <[email protected]> | 1998-05-26 13:38:00 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1998-05-26 13:38:00 +0000 |
commit | eed2faab53f859c98bf85f1e324614da640bf3ff (patch) | |
tree | 4a701250cb3300121456599f90cd7a22e03e8b59 /g10/seckey-cert.c | |
parent | new release (diff) | |
download | gnupg-eed2faab53f859c98bf85f1e324614da640bf3ff.tar.gz gnupg-eed2faab53f859c98bf85f1e324614da640bf3ff.zip |
add-key works
Diffstat (limited to '')
-rw-r--r-- | g10/seckey-cert.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/g10/seckey-cert.c b/g10/seckey-cert.c index a265a3713..8a5d98299 100644 --- a/g10/seckey-cert.c +++ b/g10/seckey-cert.c @@ -55,7 +55,7 @@ do_check( PKT_secret_cert *cert ) case CIPHER_ALGO_CAST: keyid_from_skc( cert, keyid ); dek = passphrase_to_dek( keyid, cert->protect.algo, - &cert->protect.s2k, 0 ); + &cert->protect.s2k, 0 ); cipher_hd = cipher_open( cert->protect.algo, CIPHER_MODE_AUTO_CFB, 1); cipher_setkey( cipher_hd, dek->key, dek->keylen ); @@ -227,7 +227,7 @@ check_secret_key( PKT_secret_cert *cert ) case PUBKEY_ALGO_ELGAMAL: case PUBKEY_ALGO_DSA: rc = do_check( cert ); - #if 1 /* set to 0 to disable the workaround */ + #if 0 /* set to 1 to enable the workaround */ if( rc == G10ERR_BAD_PASS && cert->is_protected && cert->protect.algo == CIPHER_ALGO_BLOWFISH && cert->pubkey_algo != PUBKEY_ALGO_ELGAMAL ) { @@ -243,11 +243,19 @@ check_secret_key( PKT_secret_cert *cert ) } #endif break; + #ifdef HAVE_RSA_CIPHER + case PUBKEY_ALGO_RSA: + case PUBKEY_ALGO_RSA_E: + case PUBKEY_ALGO_RSA_S: + rc = do_check( cert ); + break; + #endif default: rc = G10ERR_PUBKEY_ALGO; } if( get_passphrase_fd() != -1 ) break; } + return rc; } |