1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-07-04 03:08:57 +02:00

Commited change from 2001-12-13 again:

* pubkey-enc.c (get_session_key): Check that the public key
algorithm is indeed usable for en/decryption.  This avoid a
strange error message from pubkey_decrypt if for some reasons
a bad algorithm indentifier is passed.
This commit is contained in:
Werner Koch 2001-12-18 12:16:07 +00:00
parent a47537fe6f
commit 9f79634b31

View File

@ -96,8 +96,8 @@ get_session_key( PKT_pubkey_enc *k, DEK *dek )
if( sk->pubkey_algo != k->pubkey_algo ) if( sk->pubkey_algo != k->pubkey_algo )
continue; continue;
keyid_from_sk( sk, keyid ); keyid_from_sk( sk, keyid );
log_info(_("anonymous receiver; trying secret key %08lX ...\n"), log_info(_("anonymous recipient; trying secret key %08lX ...\n"),
(ulong)keyid[1] ); (ulong)keyid[1] );
rc = check_secret_key( sk, 1 ); /* ask only once */ rc = check_secret_key( sk, 1 ); /* ask only once */
if( !rc ) if( !rc )
rc = get_it( k, dek, sk, keyid ); rc = get_it( k, dek, sk, keyid );