openssl/test/ssl-tests
Todd Short 9d75dce3e1 Add TLSv1.3 post-handshake authentication (PHA)
Add SSL_verify_client_post_handshake() for servers to initiate PHA

Add SSL_force_post_handshake_auth() for clients that don't have certificates
initially configured, but use a certificate callback.

Update SSL_CTX_set_verify()/SSL_set_verify() mode:

* Add SSL_VERIFY_POST_HANDSHAKE to postpone client authentication until after
the initial handshake.

* Update SSL_VERIFY_CLIENT_ONCE now only sends out one CertRequest regardless
of when the certificate authentication takes place; either initial handshake,
re-negotiation, or post-handshake authentication.

Add 'RequestPostHandshake' and 'RequirePostHandshake' SSL_CONF options that
add the SSL_VERIFY_POST_HANDSHAKE to the 'Request' and 'Require' options

Add support to s_client:
* Enabled automatically when cert is configured
* Can be forced enabled via -force_pha

Add support to s_server:
* Use 'c' to invoke PHA in s_server
* Remove some dead code

Update documentation

Update unit tests:
* Illegal use of PHA extension
* TLSv1.3 certificate tests

DTLS and TLS behave ever-so-slightly differently. So, when DTLS1.3 is
implemented, it's PHA support state machine may need to be different.
Add a TODO and a #error

Update handshake context to deal with PHA.

The handshake context for TLSv1.3 post-handshake auth is up through the
ClientFinish message, plus the CertificateRequest message. Subsequent
Certificate, CertificateVerify, and Finish messages are based on this
handshake context (not the Certificate message per se, but it's included
after the hash). KeyUpdate, NewSessionTicket, and prior Certificate
Request messages are not included in post-handshake authentication.

After the ClientFinished message is processed, save off the digest state
for future post-handshake authentication. When post-handshake auth occurs,
copy over the saved handshake context into the "main" handshake digest.
This effectively discards the any KeyUpdate or NewSessionTicket messages
and any prior post-handshake authentication.

This, of course, assumes that the ID-22 did not mean to include any
previous post-handshake authentication into the new handshake transcript.
This is implied by section 4.4.1 that lists messages only up to the
first ClientFinished.

Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4964)
2018-02-01 17:07:56 +00:00
..
01-simple.conf
01-simple.conf.in
02-protocol-version.conf
02-protocol-version.conf.in
03-custom_verify.conf
03-custom_verify.conf.in
04-client_auth.conf
04-client_auth.conf.in
05-sni.conf Rename SSL_CTX_set_early_cb to SSL_CTX_set_client_hello_cb. 2017-09-08 13:58:59 -05:00
05-sni.conf.in Rename SSL_CTX_set_early_cb to SSL_CTX_set_client_hello_cb. 2017-09-08 13:58:59 -05:00
06-sni-ticket.conf Session resume broken switching contexts 2017-10-04 10:21:08 +10:00
06-sni-ticket.conf.in Session resume broken switching contexts 2017-10-04 10:21:08 +10:00
07-dtls-protocol-version.conf
07-dtls-protocol-version.conf.in
08-npn.conf
08-npn.conf.in
09-alpn.conf
09-alpn.conf.in
10-resumption.conf
10-resumption.conf.in
11-dtls_resumption.conf
11-dtls_resumption.conf.in
12-ct.conf
12-ct.conf.in
13-fragmentation.conf Implement Maximum Fragment Length TLS extension. 2017-11-05 17:46:48 +01:00
13-fragmentation.conf.in Copyright update of more files that have changed this year 2018-01-19 13:34:03 +01:00
14-curves.conf
14-curves.conf.in
15-certstatus.conf
15-certstatus.conf.in
16-certstatus.conf
16-dtls-certstatus.conf
16-dtls-certstatus.conf.in
17-renegotiate.conf Fix #2400 Add NO_RENEGOTIATE option 2017-06-06 22:39:41 +01:00
17-renegotiate.conf.in Fix #2400 Add NO_RENEGOTIATE option 2017-06-06 22:39:41 +01:00
18-dtls-renegotiate.conf
18-dtls-renegotiate.conf.in
19-mac-then-encrypt.conf
19-mac-then-encrypt.conf.in
20-cert-select.conf Add TLS 1.3 draft-23 PSS signature algorithms 2018-01-25 12:05:54 -06:00
20-cert-select.conf.in Add TLS 1.3 draft-23 PSS signature algorithms 2018-01-25 12:05:54 -06:00
21-key-update.conf
21-key-update.conf.in
22-compression.conf
22-compression.conf.in
23-srp.conf
23-srp.conf.in
24-padding.conf
24-padding.conf.in
25-cipher.conf Don't expect a POLY1305 ciphersuite when using no-poly1305 2017-12-11 09:41:59 +00:00
25-cipher.conf.in Fix no-chacha 2017-12-11 09:41:59 +00:00
26-tls13_client_auth.conf Add TLSv1.3 post-handshake authentication (PHA) 2018-02-01 17:07:56 +00:00
26-tls13_client_auth.conf.in Add TLSv1.3 post-handshake authentication (PHA) 2018-02-01 17:07:56 +00:00
protocol_version.pm
ssltests_base.pm