Files
wolfssl/tests/api/test_ssl_hs.h
T
Sean Parkinson 5a1cd9fc3e ssl.c split: cleanup
Clean up includes single return point from every function, consistent formatting function block comment and tests added.

ssl_api_rw.c: Cleanup; 6 helpers extracted from write_dup/shutdown; fixed a SendBuffered corner case that returned 0 instead of an error.

ssl_api_ext.c: Cleanup; extracted wolfssl_ticket_key_cb_process, wolfssl_rehandshake_prepare.

ssl_api_hs.c: Cleanup + de-indent; 9 helpers extracted, incl. shared wolfssl_handshake_flush/_done between connect and accept (~100 duplicated lines removed). wolfSSL_connect/accept left multi-exit.

ssl_api_cert.c: Cleanup of newer functions at end of file; extracted PushPeerCertToChain; fixed a double free in CreatePeerCertChain; fixed 5 wrong @param names.

ssl_api_crl_ocsp.c: Full cleanup of all 49 functions; wolfSSL_OCSP_parse_url rewritten; fixed a URL with no host returning success with the rest of the URL as the host; added IPv6 literal support; fixed 4 wrong WOLFSSL_ENTER names.

ssl.c: Moved the x509GetIssuerFromCM forward declaration here for clarity.
2026-08-07 09:30:56 +10:00

77 lines
3.8 KiB
C

/* test_ssl_hs.h
*
* Copyright (C) 2006-2026 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifndef TESTS_API_SSL_HS_H
#define TESTS_API_SSL_HS_H
#include <tests/api/api_decl.h>
int test_wolfSSL_state_string_long(void);
int test_wolfSSL_state_string_long_states(void);
int test_wolfSSL_set_connect_accept_state(void);
int test_wolfSSL_SSL_do_handshake(void);
int test_wolfSSL_SSL_in_init_hs(void);
int test_wolfSSL_is_init_finished(void);
int test_wolfSSL_SetHsDoneCb(void);
int test_wolfSSL_pk_callback_ctx(void);
int test_wolfSSL_set_accept_state_reinit(void);
int test_wolfSSL_set_accept_state_static_ecc(void);
int test_wolfSSL_negotiate_bad_args(void);
int test_wolfSSL_SSL_do_handshake_quic(void);
int test_wolfSSL_set_connect_state_dh(void);
int test_wolfSSL_connect_bad_args(void);
int test_wolfSSL_accept_bad_args(void);
int test_wolfSSL_connect_step_failures(void);
int test_wolfSSL_accept_step_failures(void);
int test_wolfSSL_hs_send_buffered_fail(void);
int test_wolfSSL_hs_send_buffered_advance(void);
int test_wolfSSL_hs_retry_alert_fail(void);
int test_wolfSSL_connect_ex_no_side(void);
int test_wolfSSL_hs_done_cb_error(void);
int test_wolfSSL_hs_info_cb(void);
#define TEST_SSL_HS_DECLS \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_state_string_long), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_state_string_long_states), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_set_connect_accept_state), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_SSL_do_handshake), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_SSL_in_init_hs), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_is_init_finished), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_SetHsDoneCb), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_pk_callback_ctx), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_set_accept_state_reinit), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_set_accept_state_static_ecc), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_negotiate_bad_args), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_SSL_do_handshake_quic), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_set_connect_state_dh), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_connect_bad_args), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_accept_bad_args), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_connect_step_failures), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_accept_step_failures), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_hs_send_buffered_fail), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_hs_send_buffered_advance), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_hs_retry_alert_fail), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_connect_ex_no_side), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_hs_done_cb_error), \
TEST_DECL_GROUP("ssl_hs", test_wolfSSL_hs_info_cb)
#endif /* TESTS_API_SSL_HS_H */