Files
wolfssl/tests/api/test_ssl_cert.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

81 lines
4.1 KiB
C

/* test_ssl_cert.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_CERT_H
#define TESTS_API_SSL_CERT_H
int test_wolfSSL_get_verify_mode(void);
int test_wolfSSL_CTX_get_verify_mode(void);
int test_wolfSSL_get_verify_callback(void);
int test_wolfSSL_CTX_get_extra_chain_certs(void);
int test_wolfSSL_get_peer_chain(void);
int test_wolfSSL_get_chain_X509(void);
int test_wolfSSL_get_chain_cert_pem(void);
int test_wolfSSL_cmp_peer_cert_to_file(void);
int test_wolfSSL_CTX_set_client_cert_cb(void);
int test_wolfSSL_CTX_set_cert_cb(void);
int test_wolfSSL_cert_setup_cb_ret(void);
int test_wolfSSL_get_peer_cert_chain(void);
int test_wolfSSL_set_peer_cert_chain(void);
int test_wolfSSL_get0_verified_chain(void);
int test_wolfSSL_CA_list_add(void);
int test_wolfSSL_CA_list_get(void);
int test_wolfSSL_load_client_CA_file(void);
int test_wolfSSL_mutual_auth(void);
int test_wolfSSL_post_handshake_auth(void);
int test_wolfSSL_verify_cert_store(void);
int test_wolfSSL_verify_cert_store_follows_ctx(void);
int test_wolfSSL_CTX_cert_store_manager_link(void);
int test_wolfSSL_cert_cb_ctx(void);
int test_wolfSSL_get_certificate_api(void);
int test_wolfSSL_cert_unload(void);
#define TEST_SSL_CERT_DECLS \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_get_verify_mode), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_CTX_get_verify_mode), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_get_verify_callback), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_CTX_get_extra_chain_certs), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_get_peer_chain), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_get_chain_X509), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_get_chain_cert_pem), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_cmp_peer_cert_to_file), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_CTX_set_client_cert_cb), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_CTX_set_cert_cb), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_cert_setup_cb_ret), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_get_peer_cert_chain), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_set_peer_cert_chain), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_get0_verified_chain), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_CA_list_add), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_CA_list_get), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_load_client_CA_file), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_mutual_auth), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_post_handshake_auth), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_verify_cert_store), \
TEST_DECL_GROUP("ssl_cert", \
test_wolfSSL_verify_cert_store_follows_ctx), \
TEST_DECL_GROUP("ssl_cert", \
test_wolfSSL_CTX_cert_store_manager_link), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_cert_cb_ctx), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_get_certificate_api), \
TEST_DECL_GROUP("ssl_cert", test_wolfSSL_cert_unload)
#endif /* TESTS_API_SSL_CERT_H */