Add #defines for magic numbers in API.
[openssl.git] / test / handshake_helper.h
index d04655a9ed9da530eaca4590bd1607130f9b6472..2fb8ac03d4a86cceee359bc4fa76c8edcba92ce7 100644 (file)
@@ -27,18 +27,27 @@ typedef struct handshake_result {
     int server_protocol;
     int client_protocol;
     /* Server connection */
     int server_protocol;
     int client_protocol;
     /* Server connection */
-    int servername;
+    ssl_servername_t servername;
     /* Session ticket status */
     /* Session ticket status */
-    int session_ticket;
+    ssl_session_ticket_t session_ticket;
     /* Was this called on the second context? */
     int session_ticket_do_not_call;
     /* Was this called on the second context? */
     int session_ticket_do_not_call;
+    char *client_npn_negotiated;
+    char *server_npn_negotiated;
+    char *client_alpn_negotiated;
+    char *server_alpn_negotiated;
+    /* Was the handshake resumed? */
+    int client_resumed;
+    int server_resumed;
 } HANDSHAKE_RESULT;
 
 } HANDSHAKE_RESULT;
 
-/* Do a handshake and report some information about the result. */
-HANDSHAKE_RESULT do_handshake(SSL_CTX *server_ctx, SSL_CTX *client_ctx,
-                              const SSL_TEST_CTX *test_ctx);
+HANDSHAKE_RESULT *HANDSHAKE_RESULT_new(void);
+void HANDSHAKE_RESULT_free(HANDSHAKE_RESULT *result);
 
 
-int do_not_call_session_ticket_callback(SSL* s, unsigned char* key_name, unsigned char *iv,
-                                        EVP_CIPHER_CTX *ctx, HMAC_CTX *hctx, int enc);
+/* Do a handshake and report some information about the result. */
+HANDSHAKE_RESULT *do_handshake(SSL_CTX *server_ctx, SSL_CTX *server2_ctx,
+                               SSL_CTX *client_ctx, SSL_CTX *resume_server_ctx,
+                               SSL_CTX *resume_client_ctx,
+                               const SSL_TEST_CTX *test_ctx);
 
 #endif  /* HEADER_HANDSHAKE_HELPER_H */
 
 #endif  /* HEADER_HANDSHAKE_HELPER_H */