From 1f72dec89dfe6099d1b935cb6f00688545deee08 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 19 Sep 2017 22:17:10 +0200 Subject: [PATCH] More tests --- test/default/misuse.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/test/default/misuse.c b/test/default/misuse.c index 65c59155..f053300c 100644 --- a/test/default/misuse.c +++ b/test/default/misuse.c @@ -6,12 +6,32 @@ # include static void -sigabrt_handler_10(int sig) +sigabrt_handler_12(int sig) { (void) sig; exit(0); } +static void +sigabrt_handler_11(int sig) +{ + (void) sig; + signal(SIGABRT, sigabrt_handler_12); + assert(crypto_box_easy(NULL, NULL, crypto_stream_xsalsa20_MESSAGEBYTES_MAX, + NULL, NULL, NULL) == -1); + exit(1); +} + +static void +sigabrt_handler_10(int sig) +{ + (void) sig; + signal(SIGABRT, sigabrt_handler_11); + assert(crypto_box_easy_afternm(NULL, NULL, crypto_stream_xsalsa20_MESSAGEBYTES_MAX, + NULL, NULL) == -1); + exit(1); +} + static void sigabrt_handler_9(int sig) {