Remove asn1 module dependency from RSASSA-PKCS1-v1_5 implementation.
authorShane Lontis <shane.lontis@oracle.com>
Sat, 21 Dec 2019 23:37:17 +0000 (09:37 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Sat, 21 Dec 2019 23:37:17 +0000 (09:37 +1000)
commit169e422edd07d4faf9cc3931dcc738b0b7402fd0
tree46ddb0763f9b6ca9a8c1412a36320031f0f1826a
parent365955fb27ff7a266d130d145217cdb939b5609a
Remove asn1 module dependency from RSASSA-PKCS1-v1_5 implementation.

Replace use of the asn1 module (X509_SIG, X509_ALGOR, ASN1_TYPE,
ASN1_OCTET_STRING, i2d_X509_SIG(), etc.) as well as OID lookups using
OBJ_nid2obj() with pre-generated DigestInfo encodings for MD2, MD5, MDC-2,
SHA-1, SHA-2 and SHA-3; the encoding is selected based on the NID. This is
similar to the approach used by the old FOM.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9138)
crypto/rsa/rsa_sign.c