openssl/test/recipes
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
..
04-test_pem_data
10-test_bn_data
15-test_ecparam_data
15-test_mp_rsa_data Support multi-prime RSA (RFC 8017) 2017-11-21 14:38:42 +08:00
30-test_evp_data SHA512/224 and SHA512/256 2018-01-24 07:09:46 +10:00
80-test_ocsp_data Add OCSP API test executable 2017-11-11 20:03:49 -06:00
90-test_store_data
95-test_external_krb5_data
95-test_external_pyca_data
01-test_abort.t
01-test_sanity.t
01-test_symbol_presence.t
01-test_test.t
02-test_internal_ctype.t This has been added to avoid the situation where some host ctype.h functions 2017-08-22 09:45:25 +10:00
02-test_lhash.t
02-test_ordinals.t
02-test_stack.t
03-test_exdata.t
03-test_internal_asn1.t
03-test_internal_chacha.t
03-test_internal_mdc2.t
03-test_internal_modes.t
03-test_internal_poly1305.t
03-test_internal_siphash.t
03-test_internal_sm4.t SM4: Add SM4 block cipher to EVP 2017-10-31 15:19:14 +10:00
03-test_internal_ssl_cert_table.t
03-test_internal_x509.t
03-test_ui.t
04-test_asn1_encode.t
04-test_asn1_string_table.t
04-test_bioprint.t
04-test_pem.t Avoid unnecessary MSYS2 conversion of some arguments 2017-11-22 00:37:34 +01:00
05-test_bf.t
05-test_cast.t
05-test_des.t
05-test_hmac.t
05-test_idea.t
05-test_md2.t
05-test_mdc2.t
05-test_rand.t Switch from ossl_rand to DRBG rand 2017-08-03 09:23:28 -04:00
05-test_rc2.t
05-test_rc4.t
05-test_rc5.t
10-test_bn.t
10-test_exp.t
15-test_dh.t
15-test_dsa.t
15-test_ec.t
15-test_ecdsa.t
15-test_ecparam.t File::Glob option ':bsd_glob' doesn't work everywhere, replace w/ a wrapper 2017-08-15 11:31:18 +02:00
15-test_genrsa.t rsa: Do not allow less than 512 bit RSA keys 2017-12-11 12:53:07 +01:00
15-test_mp_rsa.t rsa/rsa_gen.c: harmonize keygen's ability with RSA_security_bits. 2017-11-28 20:05:48 +01:00
15-test_rsa.t
15-test_rsapss.t
20-test_enc_more.t
20-test_enc.t
20-test_passwd.t
25-test_crl.t
25-test_d2i.t
25-test_pkcs7.t
25-test_req.t
25-test_sid.t
25-test_verify.t Many spelling fixes/typo's corrected. 2017-11-11 19:03:10 -05:00
25-test_x509.t
30-test_afalg.t
30-test_engine.t
30-test_evp_extra.t
30-test_evp.t
30-test_pbelu.t
30-test_pkey_meth_kdf.t Add PKEY_METHOD macro tests 2017-08-08 15:44:49 +01:00
30-test_pkey_meth.t
40-test_rehash.t Don't break testing when runnins as root 2018-01-29 12:51:22 +01:00
60-test_x509_check_cert_pkey.t
60-test_x509_dup_cert.t
60-test_x509_store.t
60-test_x509_time.t
70-test_asyncio.t
70-test_bad_dtls.t
70-test_clienthello.t
70-test_comp.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_key_share.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_packet.t
70-test_recordlen.t
70-test_renegotiation.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_servername.t
70-test_sslcbcpadding.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_sslcertstatus.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_sslextension.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_sslmessages.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_sslrecords.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_sslsessiontick.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_sslsigalgs.t Catch some more old sigalg names in comments 2018-01-26 09:23:57 -06:00
70-test_sslsignature.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_sslskewith0p.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_sslversions.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_sslvertol.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_tls13cookie.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_tls13downgrade.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_tls13hrr.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_tls13kexmodes.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_tls13messages.t Add TLSv1.3 post-handshake authentication (PHA) 2018-02-01 17:07:56 +00:00
70-test_tls13psk.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_tlsextms.t Enable TLSProxy tests on Windows 2018-01-20 09:22:20 +01:00
70-test_verify_extra.t
70-test_wpacket.t
80-test_ca.t Add random serial# support. 2017-08-22 09:00:04 -04:00
80-test_cipherbytes.t
80-test_cipherlist.t
80-test_ciphername.t
80-test_cms.t no-ec2m fixes 2017-08-10 16:48:47 +01:00
80-test_ct.t
80-test_dane.t
80-test_dtls_mtu.t
80-test_dtls.t
80-test_dtlsv1listen.t
80-test_ocsp.t Add OCSP API test executable 2017-11-11 20:03:49 -06:00
80-test_pkcs12.t Many spelling fixes/typo's corrected. 2017-11-11 19:03:10 -05:00
80-test_ssl_new.t Add TLSv1.3 post-handshake authentication (PHA) 2018-02-01 17:07:56 +00:00
80-test_ssl_old.t Copyright update of more files that have changed this year 2018-01-19 13:34:03 +01:00
80-test_ssl_test_ctx.t
80-test_sslcorrupt.t
80-test_tsa.t
80-test_x509aux.t
90-test_asn1_time.t Consolidate to a single asn1_time_from_tm() function 2017-08-04 11:24:03 +10:00
90-test_async.t
90-test_bio_enc.t
90-test_constant_time.t
90-test_fatalerr.t Add a test for CVE-2017-3737 2017-12-06 15:37:49 +00:00
90-test_gmdiff.t
90-test_ige.t
90-test_memleak.t
90-test_overhead.t
90-test_secmem.t
90-test_shlibload.t
90-test_srp.t
90-test_sslapi.t
90-test_sslbuffers.t
90-test_store.t Avoid unnecessary MSYS2 conversion of some arguments 2017-11-22 00:37:34 +01:00
90-test_threads.t
90-test_time_offset.t
90-test_tls13ccs.t Don't run the TLSv1.3 CCS tests if TLSv1.3 is not enabled 2017-12-14 15:06:38 +00:00
90-test_tls13encryption.t
90-test_tls13secrets.t
90-test_v3name.t
95-test_external_boringssl.t
95-test_external_krb5.t
95-test_external_pyca.t
99-test_ecstress.t
99-test_fuzz.t File::Glob option ':bsd_glob' doesn't work everywhere, replace w/ a wrapper 2017-08-15 11:31:18 +02:00
ocsp-response.der
tconversion.pl Consolidate the locations where we have our internal perl modules 2017-08-15 11:30:47 +02:00