RFR: 8339347: keytool -importpass insists prompting the user even if there is no terminal
Weijun Wang
weijun at openjdk.org
Thu Sep 5 16:29:49 UTC 2024
On Wed, 4 Sep 2024 16:10:50 GMT, Hai-May Chao <hchao at openjdk.org> wrote:
> Given the changes to the System.console() behavior, where it no longer returns null when a write pipe is connected to the Java process, keytool needs to be updated to determine whether an interactive terminal is attached.
test/jdk/sun/security/tools/keytool/TestImportPass.java line 37:
> 35: public class TestImportPass {
> 36: public static void main(String[] args) throws Throwable {
> 37: SecurityTools.setResponse("pass123", "pass123");
If console is not terminal, it looks like there is no need to repeat the passphrase?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20855#discussion_r1745846652
More information about the security-dev
mailing list