1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-07-02 02:48: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 )
continue;
keyid_from_sk( sk, keyid );
log_info(_("anonymous receiver; trying secret key %08lX ...\n"),
(ulong)keyid[1] );
log_info(_("anonymous recipient; trying secret key %08lX ...\n"),
(ulong)keyid[1] );
rc = check_secret_key( sk, 1 ); /* ask only once */
if( !rc )
rc = get_it( k, dek, sk, keyid );