提交 fb83f20c 编写于 作者: M Matt Caswell

Update tls13secretstest to use the new simpler test framework

Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 6530c490
......@@ -356,7 +356,7 @@ IF[{- !$disabled{tests} -}]
# build
IF[{- !$disabled{shared} -}]
PROGRAMS_NO_INST=tls13secretstest
SOURCE[tls13secretstest]=tls13secretstest.c testutil.c
SOURCE[tls13secretstest]=tls13secretstest.c testutil.c test_main.c
SOURCE[tls13secretstest]= ../ssl/tls13_enc.c ../ssl/packet.c
INCLUDE[tls13secretstest]=.. ../include
DEPEND[tls13secretstest]=../libcrypto ../libssl
......
......@@ -12,6 +12,7 @@
#include "../ssl/ssl_locl.h"
#include "testutil.h"
#include "test_main.h"
#define IVLEN 12
#define KEYLEN 16
......@@ -342,28 +343,7 @@ static int test_handshake_secrets(void)
return ret;
}
int main(int argc, char *argv[])
void register_tests()
{
BIO *err = NULL;
int testresult = 1;
err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
CRYPTO_set_mem_debug(1);
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
ADD_TEST(test_handshake_secrets);
testresult = run_tests(argv[0]);
#ifndef OPENSSL_NO_CRYPTO_MDEBUG
if (CRYPTO_mem_leaks(err) <= 0)
testresult = 1;
#endif
BIO_free(err);
if (!testresult)
fprintf(stderr, "PASS\n");
return testresult;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册