xref: /freebsd/crypto/openssl/ssl/ssl_utst.c (revision 6f9291cea8b06d251243fd47a7234018541832a3)
1a93cbc2bSJung-uk Kim /* ssl_utst.c */
2*6f9291ceSJung-uk Kim /*
3*6f9291ceSJung-uk Kim  * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
4a93cbc2bSJung-uk Kim  * project.
5a93cbc2bSJung-uk Kim  */
6a93cbc2bSJung-uk Kim /* ====================================================================
7a93cbc2bSJung-uk Kim  * Copyright (c) 2014 The OpenSSL Project.  All rights reserved.
8a93cbc2bSJung-uk Kim  *
9a93cbc2bSJung-uk Kim  * Redistribution and use in source and binary forms, with or without
10a93cbc2bSJung-uk Kim  * modification, are permitted provided that the following conditions
11a93cbc2bSJung-uk Kim  * are met:
12a93cbc2bSJung-uk Kim  *
13a93cbc2bSJung-uk Kim  * 1. Redistributions of source code must retain the above copyright
14a93cbc2bSJung-uk Kim  *    notice, this list of conditions and the following disclaimer.
15a93cbc2bSJung-uk Kim  *
16a93cbc2bSJung-uk Kim  * 2. Redistributions in binary form must reproduce the above copyright
17a93cbc2bSJung-uk Kim  *    notice, this list of conditions and the following disclaimer in
18a93cbc2bSJung-uk Kim  *    the documentation and/or other materials provided with the
19a93cbc2bSJung-uk Kim  *    distribution.
20a93cbc2bSJung-uk Kim  *
21a93cbc2bSJung-uk Kim  * 3. All advertising materials mentioning features or use of this
22a93cbc2bSJung-uk Kim  *    software must display the following acknowledgment:
23a93cbc2bSJung-uk Kim  *    "This product includes software developed by the OpenSSL Project
24a93cbc2bSJung-uk Kim  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
25a93cbc2bSJung-uk Kim  *
26a93cbc2bSJung-uk Kim  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
27a93cbc2bSJung-uk Kim  *    endorse or promote products derived from this software without
28a93cbc2bSJung-uk Kim  *    prior written permission. For written permission, please contact
29a93cbc2bSJung-uk Kim  *    openssl-core@openssl.org.
30a93cbc2bSJung-uk Kim  *
31a93cbc2bSJung-uk Kim  * 5. Products derived from this software may not be called "OpenSSL"
32a93cbc2bSJung-uk Kim  *    nor may "OpenSSL" appear in their names without prior written
33a93cbc2bSJung-uk Kim  *    permission of the OpenSSL Project.
34a93cbc2bSJung-uk Kim  *
35a93cbc2bSJung-uk Kim  * 6. Redistributions of any form whatsoever must retain the following
36a93cbc2bSJung-uk Kim  *    acknowledgment:
37a93cbc2bSJung-uk Kim  *    "This product includes software developed by the OpenSSL Project
38a93cbc2bSJung-uk Kim  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
39a93cbc2bSJung-uk Kim  *
40a93cbc2bSJung-uk Kim  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
41a93cbc2bSJung-uk Kim  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42a93cbc2bSJung-uk Kim  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
43a93cbc2bSJung-uk Kim  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
44a93cbc2bSJung-uk Kim  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45a93cbc2bSJung-uk Kim  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
46a93cbc2bSJung-uk Kim  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
47a93cbc2bSJung-uk Kim  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48a93cbc2bSJung-uk Kim  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
49a93cbc2bSJung-uk Kim  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
50a93cbc2bSJung-uk Kim  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
51a93cbc2bSJung-uk Kim  * OF THE POSSIBILITY OF SUCH DAMAGE.
52a93cbc2bSJung-uk Kim  * ====================================================================
53a93cbc2bSJung-uk Kim  *
54a93cbc2bSJung-uk Kim  */
55a93cbc2bSJung-uk Kim 
56a93cbc2bSJung-uk Kim #include "ssl_locl.h"
57a93cbc2bSJung-uk Kim 
58a93cbc2bSJung-uk Kim #ifndef OPENSSL_NO_UNIT_TEST
59a93cbc2bSJung-uk Kim 
60*6f9291ceSJung-uk Kim static const struct openssl_ssl_test_functions ssl_test_functions = {
61a93cbc2bSJung-uk Kim     ssl_init_wbio_buffer,
62a93cbc2bSJung-uk Kim     ssl3_setup_buffers,
63a93cbc2bSJung-uk Kim     tls1_process_heartbeat,
64a93cbc2bSJung-uk Kim     dtls1_process_heartbeat
65a93cbc2bSJung-uk Kim };
66a93cbc2bSJung-uk Kim 
67a93cbc2bSJung-uk Kim const struct openssl_ssl_test_functions *SSL_test_functions(void)
68a93cbc2bSJung-uk Kim {
69a93cbc2bSJung-uk Kim     return &ssl_test_functions;
70a93cbc2bSJung-uk Kim }
71a93cbc2bSJung-uk Kim 
72a93cbc2bSJung-uk Kim #endif
73