mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-12 21:58:50 +01:00
Add v5 signature salt.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
412c8fcdfd
commit
4d8decc23c
@ -264,6 +264,7 @@ typedef struct
|
||||
/* First 2 bytes of the digest. (Serialized. Note: this is not
|
||||
automatically filled in when serializing a signature!) */
|
||||
byte digest_start[2];
|
||||
byte v5_salt[16];
|
||||
/* The signature. (Serialized.) */
|
||||
gcry_mpi_t data[PUBKEY_MAX_NSIG];
|
||||
/* The message digest and its length (in bytes). Note the maximum
|
||||
|
@ -2273,6 +2273,22 @@ parse_signature (IOBUF inp, int pkttype, unsigned long pktlen,
|
||||
sig->digest_start[1] = iobuf_get_noeof (inp);
|
||||
pktlen--;
|
||||
|
||||
if (sig->version == 5)
|
||||
{
|
||||
if (pktlen < 16)
|
||||
goto underflow;
|
||||
if (iobuf_read (inp, sig->v5_salt, 16) != 16)
|
||||
{
|
||||
log_error ("premature eof while reading "
|
||||
"salt\n");
|
||||
if (list_mode)
|
||||
es_fputs (":signature packet: [premature eof]\n", listfp);
|
||||
rc = -1;
|
||||
goto leave;
|
||||
}
|
||||
pktlen -= 16;
|
||||
}
|
||||
|
||||
if (is_v4or5 && sig->pubkey_algo) /* Extract required information. */
|
||||
{
|
||||
const byte *p;
|
||||
|
Loading…
Reference in New Issue
Block a user