X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=test%2Fssl_test_ctx.h;h=29a989abc81147eb25956e57fbdf8ca4ddd4e55f;hb=177b60b48139f873dd8f7b841f2655a985d9806d;hp=5eff75cfa17349f33ca6c7182322d99442fba12c;hpb=a9c0d8beeae98355a2ef6ae1f0a9ba624be8bd54;p=oweals%2Fopenssl.git diff --git a/test/ssl_test_ctx.h b/test/ssl_test_ctx.h index 5eff75cfa1..29a989abc8 100644 --- a/test/ssl_test_ctx.h +++ b/test/ssl_test_ctx.h @@ -1,14 +1,14 @@ /* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * - * Licensed under the OpenSSL license (the "License"). You may not use + * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ -#ifndef HEADER_SSL_TEST_CTX_H -#define HEADER_SSL_TEST_CTX_H +#ifndef OSSL_TEST_SSL_TEST_CTX_H +#define OSSL_TEST_SSL_TEST_CTX_H #include #include @@ -56,6 +56,12 @@ typedef enum { SSL_TEST_COMPRESSION_YES } ssl_compression_t; +typedef enum { + SSL_TEST_SESSION_ID_IGNORE = 0, /* Default */ + SSL_TEST_SESSION_ID_YES, + SSL_TEST_SESSION_ID_NO +} ssl_session_id_t; + typedef enum { SSL_TEST_METHOD_TLS = 0, /* Default */ SSL_TEST_METHOD_DTLS @@ -67,7 +73,8 @@ typedef enum { SSL_TEST_HANDSHAKE_RENEG_SERVER, SSL_TEST_HANDSHAKE_RENEG_CLIENT, SSL_TEST_HANDSHAKE_KEY_UPDATE_SERVER, - SSL_TEST_HANDSHAKE_KEY_UPDATE_CLIENT + SSL_TEST_HANDSHAKE_KEY_UPDATE_CLIENT, + SSL_TEST_HANDSHAKE_POST_HANDSHAKE_AUTH } ssl_handshake_mode_t; typedef enum { @@ -91,6 +98,8 @@ typedef struct { 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; @@ -99,6 +108,8 @@ typedef struct { char *reneg_ciphers; char *srp_user; char *srp_password; + /* PHA enabled */ + int enable_pha; } SSL_TEST_CLIENT_CONF; typedef struct { @@ -114,6 +125,9 @@ typedef struct { /* 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 { @@ -200,6 +214,15 @@ typedef struct { STACK_OF(X509_NAME) *expected_client_ca_names; /* Whether to use SCTP for the transport */ int use_sctp; + /* Enable SSL_MODE_DTLS_SCTP_LABEL_LENGTH_BUG on client side */ + int enable_client_sctp_label_bug; + /* Enable SSL_MODE_DTLS_SCTP_LABEL_LENGTH_BUG on server side */ + int enable_server_sctp_label_bug; + /* Whether to expect a session id from the server */ + ssl_session_id_t session_id_expected; + char *expected_cipher; + /* Expected Session Ticket Application Data */ + char *expected_session_ticket_app_data; } SSL_TEST_CTX; const char *ssl_test_result_name(ssl_test_result_t result); @@ -210,10 +233,12 @@ const char *ssl_servername_name(ssl_servername_t server); const char *ssl_servername_callback_name(ssl_servername_callback_t servername_callback); const char *ssl_session_ticket_name(ssl_session_ticket_t server); +const char *ssl_session_id_name(ssl_session_id_t server); const char *ssl_test_method_name(ssl_test_method_t method); const char *ssl_handshake_mode_name(ssl_handshake_mode_t mode); const char *ssl_ct_validation_name(ssl_ct_validation_t mode); const char *ssl_certstatus_name(ssl_cert_status_t cert_status); +const char *ssl_max_fragment_len_name(int MFL_mode); /* * Load the test case context from |conf|. @@ -225,4 +250,4 @@ SSL_TEST_CTX *SSL_TEST_CTX_new(void); void SSL_TEST_CTX_free(SSL_TEST_CTX *ctx); -#endif /* HEADER_SSL_TEST_CTX_H */ +#endif /* OSSL_TEST_SSL_TEST_CTX_H */