summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-01-12 11:08:36 +0100
committerRichard Levitte <levitte@openssl.org>2017-01-12 15:23:15 +0100
commit027609f9563014a6f5bc6917f085bd77e8dc8dc7 (patch)
tree9767b4893adec687ae1c8f9194600c4354b91f5d
parent928933f92fa214fb8b4f9bbcd242ad2c3d16d46f (diff)
UI: fix uitest for no-ui configuration
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2218)
-rw-r--r--test/uitest.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/uitest.c b/test/uitest.c
index 84fe71b22d..16d83b9528 100644
--- a/test/uitest.c
+++ b/test/uitest.c
@@ -9,8 +9,8 @@
#include <stdio.h>
#include <string.h>
+#include <openssl/opensslconf.h>
#include <openssl/err.h>
-#include <openssl/ui.h>
#include "../apps/apps.h"
#include "testutil.h"
@@ -20,6 +20,9 @@
char *default_config_file = NULL;
BIO *bio_err = NULL;
+#ifndef OPENSSL_NO_UI
+# include <openssl/ui.h>
+
/* Old style PEM password callback */
static int test_pem_password_cb(char *buf, int size, int rwflag, void *userdata)
{
@@ -99,14 +102,18 @@ static int test_new_ui()
return ok;
}
+#endif
+
int test_main(int argc, char *argv[])
{
int ret;
bio_err = dup_bio_err(FORMAT_TEXT);
+#ifndef OPENSSL_NO_UI
ADD_TEST(test_old);
ADD_TEST(test_new_ui);
+#endif
ret = run_tests(argv[0]);