2017-04-28 12:42:46 +00:00
|
|
|
/*
|
2018-08-16 02:36:01 +00:00
|
|
|
* Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
|
2017-04-28 12:42:46 +00:00
|
|
|
*
|
2018-12-06 12:05:25 +00:00
|
|
|
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
2017-04-28 12:42:46 +00:00
|
|
|
* this file except in compliance with the License. You can obtain a copy
|
|
|
|
* in the file LICENSE in the source distribution or at
|
|
|
|
* https://www.openssl.org/source/license.html
|
|
|
|
*/
|
|
|
|
|
2017-04-28 12:48:13 +00:00
|
|
|
#include <stdlib.h> /* size_t */
|
2017-06-12 00:01:17 +00:00
|
|
|
#include <openssl/bn.h>
|
2017-06-21 23:35:08 +00:00
|
|
|
#include <openssl/bio.h>
|
2017-07-18 01:48:27 +00:00
|
|
|
#include "../testutil.h"
|
2017-04-28 12:48:13 +00:00
|
|
|
|
2017-04-28 12:42:46 +00:00
|
|
|
int subtest_level(void);
|
2017-04-28 12:48:13 +00:00
|
|
|
int openssl_error_cb(const char *str, size_t len, void *u);
|
2017-06-21 23:35:08 +00:00
|
|
|
const BIO_METHOD *BIO_f_tap(void);
|
2017-06-12 00:01:17 +00:00
|
|
|
|
|
|
|
void test_fail_message_prefix(const char *prefix, const char *file,
|
|
|
|
int line, const char *type,
|
|
|
|
const char *left, const char *right,
|
|
|
|
const char *op);
|
|
|
|
|
|
|
|
void test_fail_string_message(const char *prefix, const char *file,
|
|
|
|
int line, const char *type,
|
|
|
|
const char *left, const char *right,
|
|
|
|
const char *op, const char *m1, size_t l1,
|
|
|
|
const char *m2, size_t l2);
|
|
|
|
|
|
|
|
void test_fail_bignum_message(const char *prefix, const char *file,
|
|
|
|
int line, const char *type,
|
|
|
|
const char *left, const char *right,
|
|
|
|
const char *op,
|
|
|
|
const BIGNUM *bn1, const BIGNUM *bn2);
|
|
|
|
void test_fail_bignum_mono_message(const char *prefix, const char *file,
|
|
|
|
int line, const char *type,
|
|
|
|
const char *left, const char *right,
|
|
|
|
const char *op, const BIGNUM *bn);
|
|
|
|
|
|
|
|
void test_fail_memory_message(const char *prefix, const char *file,
|
|
|
|
int line, const char *type,
|
|
|
|
const char *left, const char *right,
|
|
|
|
const char *op,
|
|
|
|
const unsigned char *m1, size_t l1,
|
|
|
|
const unsigned char *m2, size_t l2);
|
|
|
|
|
2018-08-16 02:36:01 +00:00
|
|
|
__owur int setup_test_framework(int argc, char *argv[]);
|
2017-07-18 01:48:27 +00:00
|
|
|
__owur int pulldown_test_framework(int ret);
|
|
|
|
|
|
|
|
__owur int run_tests(const char *test_prog_name);
|
|
|
|
void set_test_title(const char *title);
|
2018-08-16 02:36:01 +00:00
|
|
|
|
|
|
|
typedef enum OPTION_choice_default {
|
|
|
|
OPT_ERR = -1,
|
|
|
|
OPT_EOF = 0,
|
|
|
|
OPT_TEST_ENUM
|
|
|
|
} OPTION_CHOICE_DEFAULT;
|
|
|
|
void opt_check_usage(void);
|
|
|
|
|