test/uitest.c's pem_password_cb returned 1 instead of the password length
authorRichard Levitte <levitte@openssl.org>
Wed, 28 Jun 2017 11:01:29 +0000 (13:01 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 28 Jun 2017 12:24:28 +0000 (14:24 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3791)

test/uitest.c

index 68b4b8cbd99f7f8c357f9222c368a82e780ddf64..469e2304f8b31f9057675ccc5746d321c32e9b2e 100644 (file)
@@ -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);
 }
 
 /*