1
0
Fork 0
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:
Werner Koch 2001-04-05 12:21:43 +00:00
parent 64f6858920
commit c9e908e734
17 changed files with 454 additions and 47 deletions

View file

@ -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 */