if (DBG_LOOKUP)
log_debug ("setting Signer's UID to '%s'\n", mbox);
build_sig_subpkt (sig, SIGSUBPKT_SIGNERS_UID, mbox, strlen (mbox));
+ xfree (mbox);
}
}
}
* data, it is not possible to know the used length
* without a double read of the file - to avoid that
* we simple use partial length packets. */
- if ( ptmode == 't' )
+ if ( ptmode == 't' || ptmode == 'u' || ptmode == 'm')
filesize = 0;
}
else
log_error ("build_packet(PLAINTEXT) failed: %s\n",
gpg_strerror (rc) );
pt->buf = NULL;
+ free_packet (&pkt);
}
else {
byte copy_buffer[4096];
if (sig->version >= 4)
{
- build_sig_subpkt_from_sig (sig);
+ build_sig_subpkt_from_sig (sig, pk);
mk_notation_policy_etc (sig, NULL, pk);
}
}
else {
rc = write_plaintext_packet (out, inp, fname,
- opt.textmode && !outfile ? 't':'b');
+ opt.textmode && !outfile ?
+ (opt.mimemode? 'm':'t'):'b');
}
/* catch errors from above */
/* Pipe data through all filters; i.e. write the signed stuff */
/*(current filters: zip - encrypt - armor)*/
- rc = write_plaintext_packet (out, inp, fname, opt.textmode ? 't':'b');
+ rc = write_plaintext_packet (out, inp, fname,
+ opt.textmode ? (opt.mimemode?'m':'t'):'b');
if (rc)
goto leave;
sig->expiredate=sig->timestamp+duration;
sig->sig_class = sigclass;
- build_sig_subpkt_from_sig( sig );
+ build_sig_subpkt_from_sig (sig, pksk);
mk_notation_policy_etc (sig, pk, pksk);
/* Crucial that the call to mksubpkt comes LAST before the calls
automagically lower any sig expiration dates to correctly
correspond to the differences in the timestamps (i.e. the
duration will shrink). */
- build_sig_subpkt_from_sig( sig );
+ build_sig_subpkt_from_sig (sig, pksk);
if (mksubpkt)
rc = (*mksubpkt)(sig, opaque);