1
0
Forkuj 0
kopia lustrzana git://git.gnupg.org/gnupg.git zsynchronizowano 2025-07-02 22:46:30 +02:00

* sig-check.c (do_check): Code to try both the incorrect and correct

SHA-224 DER prefixes when verifying a signature.  See the change
itself for more discussion.

* main.h, seskey.c (do_encode_md): Rename to pkcs1_encode_md and make
non-static.
Ten commit jest zawarty w:
David Shaw 2007-11-28 23:08:35 +00:00
rodzic 154407fd38
commit a92fa61c48
4 zmienionych plików z 49 dodań i 16 usunięć

Wyświetl plik

@ -1,6 +1,6 @@
/* seskey.c - make sesssion keys etc.
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
* 2006 Free Software Foundation, Inc.
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006,
* 2007 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@ -29,7 +29,6 @@
#include "main.h"
#include "i18n.h"
/****************
* Make a session key and put it into DEK
*/
@ -142,10 +141,9 @@ encode_session_key( DEK *dek, unsigned nbits )
return a;
}
static MPI
do_encode_md( MD_HANDLE md, int algo, size_t len, unsigned nbits,
const byte *asn, size_t asnlen )
MPI
pkcs1_encode_md( MD_HANDLE md, int algo, size_t len, unsigned nbits,
const byte *asn, size_t asnlen )
{
int nframe = (nbits+7) / 8;
byte *frame;
@ -260,9 +258,9 @@ encode_md_value( PKT_public_key *pk, PKT_secret_key *sk,
size_t asnlen,mdlen;
asn = md_asn_oid( hash_algo, &asnlen, &mdlen );
frame = do_encode_md( md, hash_algo, mdlen,
mpi_get_nbits(pk?pk->pkey[0]:sk->skey[0]),
asn, asnlen );
frame = pkcs1_encode_md( md, hash_algo, mdlen,
mpi_get_nbits(pk?pk->pkey[0]:sk->skey[0]),
asn, asnlen );
}
return frame;