Add support for custom signature parameters
authorDr. Stephen Henson <steve@openssl.org>
Fri, 21 Apr 2017 14:56:34 +0000 (15:56 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 25 Apr 2017 21:12:34 +0000 (22:12 +0100)
commit786dd2c22c71081492e209d93beee3ff4fe66357
treee51ecaa26605856fe4b3bc49fbae576f85566855
parent7531b3a6cd4b42bece94c0aab5b963fe03d1b139
Add support for custom signature parameters

Many signature types define the digest and public key type by a single OID
such as ecdsa_with_sha256.

Some types (RSA-PSS for example) use a single OID to indicate the signature
scheme and additional parameters are encoded in the AlgorithmIdentifier.

Add an X509_SIG_INFO structure to contain details about the signature type:
specifically the digest algorithm, public key algorithm, security bits and
various flags. This supports both existing algorithms and more complex
types.

Add accessors for the structure and a special case that retrieves signature
information from a certificate.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3301)
crypto/include/internal/asn1_int.h
crypto/include/internal/x509_int.h
crypto/x509/x509_lcl.h
crypto/x509/x509_set.c
crypto/x509v3/v3_purp.c
include/openssl/ossl_typ.h
include/openssl/x509.h