mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
* import.c (import_keys_internal): Missed one s/inp/inp2/.
* keylist.c (print_capabilities): Properly indicate per-key capabilities of sign&encrypt primary keys that have secret-parts-missing (i.e. no capabilities at all) * mainproc.c (symkey_decrypt_sesskey): Fix compiler warning.
This commit is contained in:
parent
60dff3c175
commit
e4f5b9b4c2
@ -196,7 +196,7 @@ import_keys_internal( IOBUF inp, char **fnames, int nnames,
|
||||
IOBUF inp2 = iobuf_open(fname);
|
||||
if( !fname )
|
||||
fname = "[stdin]";
|
||||
if( !inp )
|
||||
if( !inp2 )
|
||||
log_error(_("can't open `%s': %s\n"), fname, strerror(errno) );
|
||||
else {
|
||||
rc = import( inp2, fname, stats, options );
|
||||
|
@ -300,16 +300,21 @@ print_key_data( PKT_public_key *pk, u32 *keyid )
|
||||
static void
|
||||
print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock)
|
||||
{
|
||||
unsigned int use = pk? pk->pubkey_usage : sk->pubkey_usage;
|
||||
if(pk || (sk && sk->protect.s2k.mode!=1001))
|
||||
{
|
||||
unsigned int use = pk? pk->pubkey_usage : sk->pubkey_usage;
|
||||
|
||||
if ( use & PUBKEY_USAGE_ENC ) {
|
||||
if ( use & PUBKEY_USAGE_ENC )
|
||||
putchar ('e');
|
||||
|
||||
if ( use & PUBKEY_USAGE_SIG )
|
||||
{
|
||||
putchar ('s');
|
||||
if( pk? pk->is_primary : sk->is_primary )
|
||||
putchar ('c');
|
||||
}
|
||||
}
|
||||
if ( (use & PUBKEY_USAGE_SIG) && !(sk?(sk->protect.s2k.mode==1001):0) ) {
|
||||
putchar ('s');
|
||||
if( pk? pk->is_primary : sk->is_primary )
|
||||
putchar ('c');
|
||||
}
|
||||
|
||||
if ( keyblock ) { /* figure our the usable capabilities */
|
||||
KBNODE k;
|
||||
int enc=0, sign=0, cert=0;
|
||||
|
@ -245,7 +245,8 @@ symkey_decrypt_sesskey( DEK *dek, byte *sesskey, size_t slen )
|
||||
int n;
|
||||
|
||||
if ( slen < 17 || slen > 33 ) {
|
||||
log_error ( _("weird size for an encrypted session key (%d)\n"), slen);
|
||||
log_error ( _("weird size for an encrypted session key (%d)\n"),
|
||||
(int)slen);
|
||||
return;
|
||||
}
|
||||
hd = cipher_open( dek->algo, CIPHER_MODE_CFB, 1 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user