openssl/util
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
..
perl Add TLSv1.3 post-handshake authentication (PHA) 2018-02-01 17:07:56 +00:00
build.info VMS: throw away [.util]shareable_image_wrap.c.in and add replacement scripts 2017-03-14 22:27:17 +01:00
ck_errf.pl Perltidy ck_errf 2017-05-03 14:16:58 -04:00
copy.pl util/copy.pl: work around glob quirk in some of earlier 5.1x Perl versions. 2017-11-10 09:39:29 +01:00
dofile.pl Many spelling fixes/typo's corrected. 2017-11-11 19:03:10 -05:00
find-doc-nits Copyright update of more files that have changed this year 2018-01-19 13:34:03 +01:00
find-unused-errs Add -f -r flags to find-unused-errs 2017-04-16 07:57:12 -04:00
indent.pro Fix invalid function type casts. 2017-12-15 19:33:48 +01:00
libcrypto.num Revert the crypto "global lock" implementation 2018-01-31 12:25:28 -06:00
libssl.num Add TLSv1.3 post-handshake authentication (PHA) 2018-02-01 17:07:56 +00:00
local_shlib.com.in VMS: don't use /DSF, turn off CALL_DEBUG instead 2017-03-15 03:09:57 +01:00
mkbuildinf.pl Fix SOURCE_DATE_EPOCH bug; use UTC 2017-11-27 14:34:14 -05:00
mkdef.pl Update copyright years on all files merged since Jan 1st 2018 2018-01-09 05:49:01 +01:00
mkdir-p.pl utils/mkdir-p: check if dir exists also after mkdir failed 2016-06-23 11:10:29 -04:00
mkerr.pl Update copyright year in mkerr.pl 2018-01-28 12:01:04 +01:00
mkrc.pl Fix curly braces on util/mkrc.pl 2017-05-03 14:16:58 -04:00
openssl-format-source Fix some Typos and indents 2017-08-11 10:16:33 -04:00
openssl-update-copyright Enhance util/openssl-update-copyright shell script 2018-01-10 18:23:28 +01:00
opensslwrap.sh opensslwrap.sh to respect $OPENSSL_ENGINES. 2006-12-29 15:00:36 +00:00
private.num Add accessors for AdmissionSyntax 2018-01-22 11:29:52 -05:00
process_docs.pl Additional name for all commands 2017-10-18 15:33:56 -04:00
shlib_wrap.sh.in Remove automatic RPATH - adapt shlib_wrap.sh 2016-10-13 02:21:51 +02:00
su-filter.pl Remove trailing whitespace from some files. 2016-10-10 23:36:21 +01:00
unlocal_shlib.com.in VMS: don't use /DSF, turn off CALL_DEBUG instead 2017-03-15 03:09:57 +01:00