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