Implement DSA_SIG_set0() and ECDSA_SIG_set0(), for setting signature values.
authorTJ Saunders <tj@castaglia.org>
Wed, 8 Jun 2016 20:54:22 +0000 (13:54 -0700)
committerRich Salz <rsalz@openssl.org>
Mon, 13 Jun 2016 19:44:49 +0000 (15:44 -0400)
commit6a571a18dd4381940d61a3c2f0d65d2b6515c693
tree742283b7c96076c7d443a6818278c4a63e4d413f
parentd356dc561925ec9cecc58a69e2280c18a49ec41a
Implement DSA_SIG_set0() and ECDSA_SIG_set0(), for setting signature values.

SSH2 implementations which use DSA_do_verify() and ECDSA_do_verify() are given
the R and S values, and the data to be signed, by the client.  Thus in order
to validate these signatures, SSH2 implementations will digest and sign
the data -- and then pass in properly provisioned DSA_SIG and ECDSA_SIG objects.

Unfortunately, the existing OpenSSL-1.1.0 APIs do not allow for directly setting
those R and S values in these objects, which makes using OpenSSL for such
SSH2 implementations much more difficult.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1193)
crypto/dsa/dsa_asn1.c
crypto/ec/ec_asn1.c
doc/crypto/DSA_SIG_new.pod
doc/crypto/ECDSA_SIG_new.pod
include/openssl/dsa.h
include/openssl/ec.h