]> git.ipfire.org Git - thirdparty/openssl.git/blame - test/handshake_helper.h
New SSL test framework
[thirdparty/openssl.git] / test / handshake_helper.h
CommitLineData
453dfd8d
EK
1/*
2 * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the OpenSSL licenses, (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * https://www.openssl.org/source/license.html
8 * or in the file LICENSE in the source distribution.
9 */
10
11#ifndef HEADER_HANDSHAKE_HELPER_H
12#define HEADER_HANDSHAKE_HELPER_H
13
14#include "ssl_test_ctx.h"
15
16typedef struct handshake_result {
17 ssl_test_result_t result;
18 /* These alerts are in the 2-byte format returned by the info_callback. */
19 /* Alert sent by the client; 0 if no alert. */
20 int client_alert_sent;
21 /* Alert received by the server; 0 if no alert. */
22 int client_alert_received;
23 /* Alert sent by the server; 0 if no alert. */
24 int server_alert_sent;
25 /* Alert received by the client; 0 if no alert. */
26 int server_alert_received;
27 /* Negotiated protocol. On success, these should always match. */
28 int server_protocol;
29 int client_protocol;
30} HANDSHAKE_RESULT;
31
32/* Do a handshake and report some information about the result. */
33HANDSHAKE_RESULT do_handshake(SSL_CTX *server_ctx, SSL_CTX *client_ctx);
34
35#endif /* HEADER_HANDSHAKE_HELPER_H */