+typedef enum {
+ SSL_TEST_CT_VALIDATION_NONE = 0, /* Default */
+ SSL_TEST_CT_VALIDATION_PERMISSIVE,
+ SSL_TEST_CT_VALIDATION_STRICT
+} ssl_ct_validation_t;
+
+typedef enum {
+ SSL_TEST_CERT_STATUS_NONE = 0, /* Default */
+ SSL_TEST_CERT_STATUS_GOOD_RESPONSE,
+ SSL_TEST_CERT_STATUS_BAD_RESPONSE
+} ssl_cert_status_t;
+
+/*
+ * Server/client settings that aren't supported by the SSL CONF library,
+ * such as callbacks.
+ */
+typedef struct {
+ /* One of a number of predefined custom callbacks. */
+ ssl_verify_callback_t verify_callback;
+ /* One of a number of predefined server names use by the client */
+ ssl_servername_t servername;
+ /* Maximum Fragment Length extension mode */
+ int max_fragment_len_mode;
+ /* Supported NPN and ALPN protocols. A comma-separated list. */
+ char *npn_protocols;
+ char *alpn_protocols;
+ ssl_ct_validation_t ct_validation;
+ /* Ciphersuites to set on a renegotiation */
+ char *reneg_ciphers;
+ char *srp_user;
+ char *srp_password;
+ /* PHA enabled */
+ int enable_pha;
+} SSL_TEST_CLIENT_CONF;
+
+typedef struct {
+ /* SNI callback (server-side). */
+ ssl_servername_callback_t servername_callback;
+ /* Supported NPN and ALPN protocols. A comma-separated list. */
+ char *npn_protocols;
+ char *alpn_protocols;
+ /* Whether to set a broken session ticket callback. */
+ int broken_session_ticket;
+ /* Should we send a CertStatus message? */
+ ssl_cert_status_t cert_status;
+ /* An SRP user known to the server. */
+ char *srp_user;
+ char *srp_password;
+ /* Forced PHA */
+ int force_pha;
+ char *session_ticket_app_data;
+} SSL_TEST_SERVER_CONF;
+
+typedef struct {
+ SSL_TEST_CLIENT_CONF client;
+ SSL_TEST_SERVER_CONF server;
+ SSL_TEST_SERVER_CONF server2;
+} SSL_TEST_EXTRA_CONF;
+
+typedef struct {
+ /*
+ * Global test configuration. Does not change between handshakes.
+ */
+ /* Whether the server/client CTX should use DTLS or TLS. */
+ ssl_test_method_t method;
+ /* Whether to test a resumed/renegotiated handshake. */
+ ssl_handshake_mode_t handshake_mode;
+ /*
+ * How much application data to exchange (default is 256 bytes).
+ * Both peers will send |app_data_size| bytes interleaved.
+ */
+ int app_data_size;
+ /* Maximum send fragment size. */
+ int max_fragment_size;
+ /* KeyUpdate type */
+ int key_update_type;
+
+ /*
+ * Extra server/client configurations. Per-handshake.
+ */
+ /* First handshake. */
+ SSL_TEST_EXTRA_CONF extra;
+ /* Resumed handshake. */
+ SSL_TEST_EXTRA_CONF resume_extra;
+
+ /*
+ * Test expectations. These apply to the LAST handshake.
+ */