1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Obsolete option --no-sig-create-check.

* cipher/rsa.c (rsa_sign): Verify after sign.
* g10/gpg.c (opts): Make --no-sig-create-check a NOP.
* g10/options.h (opt): Remove field "no_sig_create_check".
* g10/sign.c (do_sign): Do check only for DSA.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2015-08-31 23:55:16 +02:00
parent ae38cbbca4
commit ae61f01523
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
5 changed files with 19 additions and 15 deletions

View file

@ -452,6 +452,9 @@ int
rsa_sign( int algo, MPI *resarr, MPI data, MPI *skey )
{
RSA_secret_key sk;
RSA_public_key pk;
MPI cres;
int rc;
if( algo != 1 && algo != 3 )
return G10ERR_PUBKEY_ALGO;
@ -465,7 +468,15 @@ rsa_sign( int algo, MPI *resarr, MPI data, MPI *skey )
resarr[0] = mpi_alloc( mpi_get_nlimbs( sk.n ) );
secret( resarr[0], data, &sk );
return 0;
/* Check for a failure in secret(). */
cres = mpi_alloc ( mpi_nlimb_hint_from_nbits (160) );
pk.n = sk.n;
pk.e = sk.e;
public (cres, resarr[0], &pk);
rc = mpi_cmp (cres, data)? G10ERR_BAD_SIGN : 0;
mpi_free (cres);
return rc;
}
int