mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +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
|
@ -1766,6 +1766,12 @@ parse_encrypted( IOBUF inp, int pkttype, unsigned long pktlen,
|
|||
|
||||
ed = pkt->pkt.encrypted = m_alloc(sizeof *pkt->pkt.encrypted );
|
||||
ed->len = pktlen;
|
||||
/* we don't know the extralen which is (cipher_blocksize+2)
|
||||
because the algorithm ist not specified in this packet.
|
||||
However, it is only important to know this for somesanity
|
||||
checks on the pkacet length - it doesn't matter that we can't
|
||||
do it */
|
||||
ed->extralen = 0;
|
||||
ed->buf = NULL;
|
||||
ed->new_ctb = new_ctb;
|
||||
ed->mdc_method = 0;
|
||||
|
@ -1894,4 +1900,25 @@ parse_gpg_control( IOBUF inp,
|
|||
return G10ERR_INVALID_PACKET;
|
||||
}
|
||||
|
||||
/* create a gpg control packet to be used internally as a placeholder */
|
||||
PACKET *
|
||||
create_gpg_control( ctrlpkttype_t type, const byte *data, size_t datalen )
|
||||
{
|
||||
PACKET *packet;
|
||||
byte *p;
|
||||
|
||||
packet = m_alloc( sizeof *packet );
|
||||
init_packet(packet);
|
||||
packet->pkttype = PKT_GPG_CONTROL;
|
||||
packet->pkt.gpg_control = m_alloc(sizeof *packet->pkt.gpg_control
|
||||
+ datalen - 1);
|
||||
packet->pkt.gpg_control->control = type;
|
||||
packet->pkt.gpg_control->datalen = datalen;
|
||||
p = packet->pkt.gpg_control->data;
|
||||
for( ; datalen; datalen--, p++ )
|
||||
*p = *data++;
|
||||
|
||||
return packet;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue