openssl/apps
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
..
demoSRP Missing SRP files. 2011-03-16 11:50:33 +00:00
app_rand.c Fix use-after-free 2017-07-17 07:46:49 -04:00
apps.c Make sure that apps/openssl prefixes its output with '# ' during tests 2018-02-01 07:10:48 +01:00
apps.h Make sure that apps/openssl prefixes its output with '# ' during tests 2018-02-01 07:10:48 +01:00
asn1pars.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
bf_prefix.c Add an apps internal BIO filter for prefixing output lines 2018-02-01 07:10:47 +01:00
build.info Add an apps internal BIO filter for prefixing output lines 2018-02-01 07:10:47 +01:00
ca-cert.srl
ca-key.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
ca-req.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
ca.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
CA.pl.in Adjusted Argument Indices 2017-12-03 14:01:39 +01:00
cert.pem
ciphers.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
client.pem Replace expired test server and client certificates with new ones. 2011-12-08 14:44:05 +00:00
cms.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
crl2p7.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
crl.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
ct_log_list.cnf GH1536: Install empty CT log list 2016-09-14 18:22:33 -04:00
dgst.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
dh1024.pem Update Diffie-Hellman parameters to IANA standards 2016-05-03 10:32:01 -04:00
dh2048.pem Update Diffie-Hellman parameters to IANA standards 2016-05-03 10:32:01 -04:00
dh4096.pem Update Diffie-Hellman parameters to IANA standards 2016-05-03 10:32:01 -04:00
dhparam.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
dsa512.pem
dsa1024.pem
dsa-ca.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
dsa-pca.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
dsa.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
dsap.pem
dsaparam.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
ec.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
ecparam.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
enc.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
engine.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
errstr.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
gendsa.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
genpkey.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
genrsa.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
nseq.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
ocsp.c ocsp.c doesn't free the whole output chain, maybe causing a memory leak 2018-02-01 07:10:48 +01:00
openssl-vms.cnf Added support for ESSCertIDv2 2017-05-03 09:04:23 +02:00
openssl.c Make sure that apps/openssl prefixes its output with '# ' during tests 2018-02-01 07:10:48 +01:00
openssl.cnf Added support for ESSCertIDv2 2017-05-03 09:04:23 +02:00
opt.c Copyright update of more files that have changed this year 2018-01-19 13:34:03 +01:00
passwd.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
pca-cert.srl
pca-key.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
pca-req.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
pkcs7.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
pkcs8.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
pkcs12.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
pkey.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
pkeyparam.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
pkeyutl.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
prime.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
privkey.pem PR: 1644 2009-09-06 15:49:46 +00:00
progs.pl Copyright update of more files that have changed this year 2018-01-19 13:34:03 +01:00
rand.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
rehash.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
req.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
req.pem
rsa8192.pem
rsa.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
rsautl.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
s512-key.pem
s512-req.pem
s1024key.pem
s1024req.pem
s_apps.h Clean up a bundle of codingstyle stuff in apps directory 2017-06-12 16:11:05 -04:00
s_cb.c Add TLSv1.3 post-handshake authentication (PHA) 2018-02-01 17:07:56 +00:00
s_client.c Add TLSv1.3 post-handshake authentication (PHA) 2018-02-01 17:07:56 +00:00
s_server.c Add TLSv1.3 post-handshake authentication (PHA) 2018-02-01 17:07:56 +00:00
s_socket.c Fix some style nits in commit eee8a40 2018-01-26 19:15:28 +01:00
s_time.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
server2.pem Replace expired test server and client certificates with new ones. 2011-12-08 14:44:05 +00:00
server.pem Replace expired test server and client certificates with new ones. 2011-12-08 14:44:05 +00:00
server.srl
sess_id.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
smime.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
speed.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
spkac.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
srp.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
storeutl.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
testCA.pem
testdsa.h Clean up a bundle of codingstyle stuff in apps directory 2017-06-12 16:11:05 -04:00
testrsa.h Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
timeouts.h Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
ts.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
tsget.in Cleanup some copyright stuff 2017-06-30 21:56:44 -04:00
verify.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
version.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00
vms_decc_init.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
vms_term_sock.c Consistent formatting for sizeof(foo) 2017-12-07 19:11:49 -05:00
vms_term_sock.h Cleanup some copyright stuff 2017-06-30 21:56:44 -04:00
win32_init.c Fix not-c code 2016-10-19 00:56:48 +02:00
x509.c apps: Don't include progs.h in apps.h 2018-01-31 23:45:12 +01:00