1*e0c4386eSCy Schubert /*
2*e0c4386eSCy Schubert  * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
3*e0c4386eSCy Schubert  *
4*e0c4386eSCy Schubert  * Licensed under the Apache License 2.0 (the "License").  You may not use
5*e0c4386eSCy Schubert  * this file except in compliance with the License.  You can obtain a copy
6*e0c4386eSCy Schubert  * in the file LICENSE in the source distribution or at
7*e0c4386eSCy Schubert  * https://www.openssl.org/source/license.html
8*e0c4386eSCy Schubert  */
9*e0c4386eSCy Schubert 
10*e0c4386eSCy Schubert #include <stdlib.h>              /* size_t */
11*e0c4386eSCy Schubert #include <openssl/bn.h>
12*e0c4386eSCy Schubert #include <openssl/bio.h>
13*e0c4386eSCy Schubert #include "../testutil.h"
14*e0c4386eSCy Schubert 
15*e0c4386eSCy Schubert #define TEST_SKIP_CODE  123
16*e0c4386eSCy Schubert 
17*e0c4386eSCy Schubert int subtest_level(void);
18*e0c4386eSCy Schubert int openssl_error_cb(const char *str, size_t len, void *u);
19*e0c4386eSCy Schubert const BIO_METHOD *BIO_f_tap(void);
20*e0c4386eSCy Schubert 
21*e0c4386eSCy Schubert void test_fail_message_prefix(const char *prefix, const char *file,
22*e0c4386eSCy Schubert                               int line, const char *type,
23*e0c4386eSCy Schubert                               const char *left, const char *right,
24*e0c4386eSCy Schubert                               const char *op);
25*e0c4386eSCy Schubert 
26*e0c4386eSCy Schubert void test_fail_string_message(const char *prefix, const char *file,
27*e0c4386eSCy Schubert                               int line, const char *type,
28*e0c4386eSCy Schubert                               const char *left, const char *right,
29*e0c4386eSCy Schubert                               const char *op, const char *m1, size_t l1,
30*e0c4386eSCy Schubert                               const char *m2, size_t l2);
31*e0c4386eSCy Schubert 
32*e0c4386eSCy Schubert void test_fail_bignum_message(const char *prefix, const char *file,
33*e0c4386eSCy Schubert                               int line, const char *type,
34*e0c4386eSCy Schubert                               const char *left, const char *right,
35*e0c4386eSCy Schubert                               const char *op,
36*e0c4386eSCy Schubert                               const BIGNUM *bn1, const BIGNUM *bn2);
37*e0c4386eSCy Schubert void test_fail_bignum_mono_message(const char *prefix, const char *file,
38*e0c4386eSCy Schubert                                    int line, const char *type,
39*e0c4386eSCy Schubert                                    const char *left, const char *right,
40*e0c4386eSCy Schubert                                    const char *op, const BIGNUM *bn);
41*e0c4386eSCy Schubert 
42*e0c4386eSCy Schubert void test_fail_memory_message(const char *prefix, const char *file,
43*e0c4386eSCy Schubert                               int line, const char *type,
44*e0c4386eSCy Schubert                               const char *left, const char *right,
45*e0c4386eSCy Schubert                               const char *op,
46*e0c4386eSCy Schubert                               const unsigned char *m1, size_t l1,
47*e0c4386eSCy Schubert                               const unsigned char *m2, size_t l2);
48*e0c4386eSCy Schubert 
49*e0c4386eSCy Schubert __owur int setup_test_framework(int argc, char *argv[]);
50*e0c4386eSCy Schubert __owur int pulldown_test_framework(int ret);
51*e0c4386eSCy Schubert 
52*e0c4386eSCy Schubert __owur int run_tests(const char *test_prog_name);
53*e0c4386eSCy Schubert void set_test_title(const char *title);
54*e0c4386eSCy Schubert 
55*e0c4386eSCy Schubert typedef enum OPTION_choice_default {
56*e0c4386eSCy Schubert     OPT_ERR = -1,
57*e0c4386eSCy Schubert     OPT_EOF = 0,
58*e0c4386eSCy Schubert     OPT_TEST_ENUM
59*e0c4386eSCy Schubert } OPTION_CHOICE_DEFAULT;
60*e0c4386eSCy Schubert void opt_check_usage(void);
61*e0c4386eSCy Schubert 
62