mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-06 06:29:42 +00:00
UI: fix uitest for no-ui configuration
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2218)
This commit is contained in:
parent
928933f92f
commit
027609f956
@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <openssl/opensslconf.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/ui.h>
|
|
||||||
#include "../apps/apps.h"
|
#include "../apps/apps.h"
|
||||||
|
|
||||||
#include "testutil.h"
|
#include "testutil.h"
|
||||||
@ -20,6 +20,9 @@
|
|||||||
char *default_config_file = NULL;
|
char *default_config_file = NULL;
|
||||||
BIO *bio_err = NULL;
|
BIO *bio_err = NULL;
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_UI
|
||||||
|
# include <openssl/ui.h>
|
||||||
|
|
||||||
/* Old style PEM password callback */
|
/* Old style PEM password callback */
|
||||||
static int test_pem_password_cb(char *buf, int size, int rwflag, void *userdata)
|
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;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
int test_main(int argc, char *argv[])
|
int test_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
bio_err = dup_bio_err(FORMAT_TEXT);
|
bio_err = dup_bio_err(FORMAT_TEXT);
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_UI
|
||||||
ADD_TEST(test_old);
|
ADD_TEST(test_old);
|
||||||
ADD_TEST(test_new_ui);
|
ADD_TEST(test_new_ui);
|
||||||
|
#endif
|
||||||
|
|
||||||
ret = run_tests(argv[0]);
|
ret = run_tests(argv[0]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user