test/uitest.c's pem_password_cb returned 1 instead of the password length
[openssl.git] / test / uitest.c
index 855dc45442df27dbc0a0365653dd0eb28db91989..469e2304f8b31f9057675ccc5746d321c32e9b2e 100644 (file)
@@ -11,7 +11,7 @@
 #include <string.h>
 #include <openssl/opensslconf.h>
 #include <openssl/err.h>
-#include "../apps/apps.h"
+#include "apps.h"
 #include "testutil.h"
 
 /* apps/apps.c depend on these */
@@ -24,7 +24,7 @@ char *default_config_file = NULL;
 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);
 }
 
 /*