ssl_test.c (1.1.1.2) | ssl_test.c (1.1.1.1) |
---|---|
1/* | 1/* |
2 * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. | 2 * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. |
3 * 4 * Licensed under the OpenSSL license (the "License"). You may not use 5 * this file except in compliance with the License. You can obtain a copy 6 * in the file LICENSE in the source distribution or at 7 * https://www.openssl.org/source/license.html 8 */ 9 10#include <stdio.h> --- 233 unchanged lines hidden (view full) --- 244 245 test_ctx = SSL_TEST_CTX_create(conf, fixture.test_app); 246 if (test_ctx == NULL) 247 goto err; 248 249#ifndef OPENSSL_NO_DTLS 250 if (test_ctx->method == SSL_TEST_METHOD_DTLS) { 251 server_ctx = SSL_CTX_new(DTLS_server_method()); | 3 * 4 * Licensed under the OpenSSL license (the "License"). You may not use 5 * this file except in compliance with the License. You can obtain a copy 6 * in the file LICENSE in the source distribution or at 7 * https://www.openssl.org/source/license.html 8 */ 9 10#include <stdio.h> --- 233 unchanged lines hidden (view full) --- 244 245 test_ctx = SSL_TEST_CTX_create(conf, fixture.test_app); 246 if (test_ctx == NULL) 247 goto err; 248 249#ifndef OPENSSL_NO_DTLS 250 if (test_ctx->method == SSL_TEST_METHOD_DTLS) { 251 server_ctx = SSL_CTX_new(DTLS_server_method()); |
252 TEST_check(SSL_CTX_set_max_proto_version(server_ctx, DTLS_MAX_VERSION)); | |
253 if (test_ctx->extra.server.servername_callback != 254 SSL_TEST_SERVERNAME_CB_NONE) { 255 server2_ctx = SSL_CTX_new(DTLS_server_method()); 256 TEST_check(server2_ctx != NULL); 257 } 258 client_ctx = SSL_CTX_new(DTLS_client_method()); | 252 if (test_ctx->extra.server.servername_callback != 253 SSL_TEST_SERVERNAME_CB_NONE) { 254 server2_ctx = SSL_CTX_new(DTLS_server_method()); 255 TEST_check(server2_ctx != NULL); 256 } 257 client_ctx = SSL_CTX_new(DTLS_client_method()); |
259 TEST_check(SSL_CTX_set_max_proto_version(client_ctx, DTLS_MAX_VERSION)); | |
260 if (test_ctx->handshake_mode == SSL_TEST_HANDSHAKE_RESUME) { 261 resume_server_ctx = SSL_CTX_new(DTLS_server_method()); | 258 if (test_ctx->handshake_mode == SSL_TEST_HANDSHAKE_RESUME) { 259 resume_server_ctx = SSL_CTX_new(DTLS_server_method()); |
262 TEST_check(SSL_CTX_set_max_proto_version(resume_server_ctx, 263 DTLS_MAX_VERSION)); | |
264 resume_client_ctx = SSL_CTX_new(DTLS_client_method()); | 260 resume_client_ctx = SSL_CTX_new(DTLS_client_method()); |
265 TEST_check(SSL_CTX_set_max_proto_version(resume_client_ctx, 266 DTLS_MAX_VERSION)); | |
267 TEST_check(resume_server_ctx != NULL); 268 TEST_check(resume_client_ctx != NULL); 269 } 270 } 271#endif 272 if (test_ctx->method == SSL_TEST_METHOD_TLS) { 273 server_ctx = SSL_CTX_new(TLS_server_method()); | 261 TEST_check(resume_server_ctx != NULL); 262 TEST_check(resume_client_ctx != NULL); 263 } 264 } 265#endif 266 if (test_ctx->method == SSL_TEST_METHOD_TLS) { 267 server_ctx = SSL_CTX_new(TLS_server_method()); |
274 TEST_check(SSL_CTX_set_max_proto_version(server_ctx, TLS_MAX_VERSION)); | |
275 /* SNI on resumption isn't supported/tested yet. */ 276 if (test_ctx->extra.server.servername_callback != 277 SSL_TEST_SERVERNAME_CB_NONE) { 278 server2_ctx = SSL_CTX_new(TLS_server_method()); 279 TEST_check(server2_ctx != NULL); 280 } 281 client_ctx = SSL_CTX_new(TLS_client_method()); | 268 /* SNI on resumption isn't supported/tested yet. */ 269 if (test_ctx->extra.server.servername_callback != 270 SSL_TEST_SERVERNAME_CB_NONE) { 271 server2_ctx = SSL_CTX_new(TLS_server_method()); 272 TEST_check(server2_ctx != NULL); 273 } 274 client_ctx = SSL_CTX_new(TLS_client_method()); |
282 TEST_check(SSL_CTX_set_max_proto_version(client_ctx, TLS_MAX_VERSION)); | |
283 284 if (test_ctx->handshake_mode == SSL_TEST_HANDSHAKE_RESUME) { 285 resume_server_ctx = SSL_CTX_new(TLS_server_method()); | 275 276 if (test_ctx->handshake_mode == SSL_TEST_HANDSHAKE_RESUME) { 277 resume_server_ctx = SSL_CTX_new(TLS_server_method()); |
286 TEST_check(SSL_CTX_set_max_proto_version(resume_server_ctx, 287 TLS_MAX_VERSION)); | |
288 resume_client_ctx = SSL_CTX_new(TLS_client_method()); | 278 resume_client_ctx = SSL_CTX_new(TLS_client_method()); |
289 TEST_check(SSL_CTX_set_max_proto_version(resume_client_ctx, 290 TLS_MAX_VERSION)); | |
291 TEST_check(resume_server_ctx != NULL); 292 TEST_check(resume_client_ctx != NULL); 293 } 294 } 295 296 TEST_check(server_ctx != NULL); 297 TEST_check(client_ctx != NULL); 298 --- 73 unchanged lines hidden --- | 279 TEST_check(resume_server_ctx != NULL); 280 TEST_check(resume_client_ctx != NULL); 281 } 282 } 283 284 TEST_check(server_ctx != NULL); 285 TEST_check(client_ctx != NULL); 286 --- 73 unchanged lines hidden --- |