mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Improved pipemode and tweaked handling of multiple signatures.
This commit is contained in:
parent
64f6858920
commit
c9e908e734
17 changed files with 454 additions and 47 deletions
15
g10/getkey.c
15
g10/getkey.c
|
@ -1881,14 +1881,23 @@ premerge_public_with_secret ( KBNODE pubblock, KBNODE secblock )
|
|||
for (sec=secblock->next; sec; sec = sec->next ) {
|
||||
if ( sec->pkt->pkttype == PKT_SECRET_SUBKEY ) {
|
||||
PKT_secret_key *sk = sec->pkt->pkt.secret_key;
|
||||
if ( !cmp_public_secret_key ( pk, sk ) )
|
||||
if ( !cmp_public_secret_key ( pk, sk ) ) {
|
||||
if ( sk->protect.s2k.mode == 1001 ) {
|
||||
/* The secret parts are not available so
|
||||
we can't use that key for signing etc.
|
||||
Fix the pubkey usage */
|
||||
pk->pubkey_usage &= ~PUBKEY_USAGE_SIG;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( !sec ) {
|
||||
KBNODE next, ll;
|
||||
log_error ( "no corresponding secret subkey "
|
||||
"for public subkey - removing\n" );
|
||||
|
||||
log_info ( "no secret subkey "
|
||||
"for public subkey %08lX - ignoring\n",
|
||||
(ulong)keyid_from_pk (pk,NULL) );
|
||||
/* we have to remove the subkey in this case */
|
||||
assert ( last );
|
||||
/* find the next subkey */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue