]>
Commit | Line | Data |
---|---|---|
453dfd8d EK |
1 | /* |
2 | * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. | |
3 | * | |
440e5d80 RS |
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 | |
453dfd8d | 7 | * https://www.openssl.org/source/license.html |
453dfd8d EK |
8 | */ |
9 | ||
10 | #ifndef HEADER_HANDSHAKE_HELPER_H | |
11 | #define HEADER_HANDSHAKE_HELPER_H | |
12 | ||
13 | #include "ssl_test_ctx.h" | |
14 | ||
15 | typedef struct handshake_result { | |
16 | ssl_test_result_t result; | |
17 | /* These alerts are in the 2-byte format returned by the info_callback. */ | |
18 | /* Alert sent by the client; 0 if no alert. */ | |
19 | int client_alert_sent; | |
20 | /* Alert received by the server; 0 if no alert. */ | |
21 | int client_alert_received; | |
22 | /* Alert sent by the server; 0 if no alert. */ | |
23 | int server_alert_sent; | |
24 | /* Alert received by the client; 0 if no alert. */ | |
25 | int server_alert_received; | |
26 | /* Negotiated protocol. On success, these should always match. */ | |
27 | int server_protocol; | |
28 | int client_protocol; | |
5c753de6 | 29 | /* Server connection */ |
81fc33c9 | 30 | ssl_servername_t servername; |
5c753de6 | 31 | /* Session ticket status */ |
81fc33c9 | 32 | ssl_session_ticket_t session_ticket; |
5c753de6 TS |
33 | /* Was this called on the second context? */ |
34 | int session_ticket_do_not_call; | |
ce2cdac2 EK |
35 | char *client_npn_negotiated; |
36 | char *server_npn_negotiated; | |
37 | char *client_alpn_negotiated; | |
38 | char *server_alpn_negotiated; | |
590ed3d7 EK |
39 | /* Was the handshake resumed? */ |
40 | int client_resumed; | |
41 | int server_resumed; | |
453dfd8d EK |
42 | } HANDSHAKE_RESULT; |
43 | ||
ce2cdac2 EK |
44 | HANDSHAKE_RESULT *HANDSHAKE_RESULT_new(void); |
45 | void HANDSHAKE_RESULT_free(HANDSHAKE_RESULT *result); | |
46 | ||
453dfd8d | 47 | /* Do a handshake and report some information about the result. */ |
ce2cdac2 | 48 | HANDSHAKE_RESULT *do_handshake(SSL_CTX *server_ctx, SSL_CTX *server2_ctx, |
590ed3d7 | 49 | SSL_CTX *client_ctx, SSL_CTX *resume_server_ctx, |
11279b13 | 50 | SSL_CTX *resume_client_ctx, |
590ed3d7 | 51 | const SSL_TEST_CTX *test_ctx); |
5c753de6 | 52 | |
453dfd8d | 53 | #endif /* HEADER_HANDSHAKE_HELPER_H */ |