Rewrite RAND_egd
[openssl.git] / test / uitest.c
index 68b4b8cbd99f7f8c357f9222c368a82e780ddf64..6fef137b02681e29436a9d5cdfe9f99e0685ab5e 100644 (file)
 /* apps/apps.c depend on these */
 char *default_config_file = NULL;
 
-#ifndef OPENSSL_NO_UI
-# include <openssl/ui.h>
+#include <openssl/ui.h>
 
 /* Old style PEM password callback */
 static int test_pem_password_cb(char *buf, int size, int rwflag, void *userdata)
 {
     OPENSSL_strlcpy(buf, (char *)userdata, (size_t)size);
-    return 1;
+    return strlen(buf);
 }
 
 /*
@@ -89,12 +88,8 @@ static int test_new_ui()
     return ok;
 }
 
-#endif
-
 void register_tests(void)
 {
-#ifndef OPENSSL_NO_UI
     ADD_TEST(test_old);
     ADD_TEST(test_new_ui);
-#endif
 }