diff options
author | Benjamin Kaduk <bkaduk@akamai.com> | 2018-01-11 11:47:12 -0600 |
---|---|---|
committer | Benjamin Kaduk <bkaduk@akamai.com> | 2018-01-25 12:57:22 -0600 |
commit | c589c34e619c8700ab16b152dd9c8ee58356b319 (patch) | |
tree | a2e3f758062721c082f0d836040b80c37bad329a /ssl/s3_lib.c | |
parent | a6419d1ed873a94bce99ae2b880885b8780d6eb9 (diff) |
Add support for the TLS 1.3 signature_algorithms_cert extension
The new extension is like signature_algorithms, but only for the
signature *on* the certificate we will present to the peer (the
old signature_algorithms extension is still used for signatures that
we *generate*, i.e., those over TLS data structures).
We do not need to generate this extension, since we are the same
implementation as our X.509 stack and can handle the same types
of signatures, but we need to be prepared to receive it, and use the received
information when selecting what certificate to present.
There is a lot of interplay between signature_algorithms_cert and
signature_algorithms, since both affect what certificate we can
use, and thus the resulting signature algorithm used for TLS messages.
So, apply signature_algorithms_cert (if present) as a filter on what
certificates we can consider when choosing a certificate+sigalg
pair.
As part of this addition, we also remove the fallback code that let
keys of type EVP_PKEY_RSA be used to generate RSA-PSS signatures -- the
new rsa_pss_pss_* and rsa_pss_rsae_* signature schemes have pulled
the key type into what is covered by the signature algorithm, so
we should not apply this sort of compatibility workaround.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5068)
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r-- | ssl/s3_lib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 9d8bd8b041..7efffd7fc0 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -3324,6 +3324,7 @@ void ssl3_free(SSL *s) OPENSSL_free(s->s3->tmp.ciphers_raw); OPENSSL_clear_free(s->s3->tmp.pms, s->s3->tmp.pmslen); OPENSSL_free(s->s3->tmp.peer_sigalgs); + OPENSSL_free(s->s3->tmp.peer_cert_sigalgs); ssl3_free_digest_list(s); OPENSSL_free(s->s3->alpn_selected); OPENSSL_free(s->s3->alpn_proposed); @@ -3343,6 +3344,7 @@ int ssl3_clear(SSL *s) OPENSSL_free(s->s3->tmp.ciphers_raw); OPENSSL_clear_free(s->s3->tmp.pms, s->s3->tmp.pmslen); OPENSSL_free(s->s3->tmp.peer_sigalgs); + OPENSSL_free(s->s3->tmp.peer_cert_sigalgs); #if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH) EVP_PKEY_free(s->s3->tmp.pkey); |