Skip to content

Commit

Permalink
Backport a5c2d7b305407974b3f67c48b8dcb1f8e77abde3
Browse files Browse the repository at this point in the history
  • Loading branch information
GoeLin committed Dec 4, 2024
1 parent ed63b71 commit 4ba6947
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 0 additions & 1 deletion test/jdk/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,6 @@ sun/security/smartcardio/TestExclusive.java 8039280 generic-
sun/security/smartcardio/TestMultiplePresent.java 8039280 generic-all
sun/security/smartcardio/TestPresent.java 8039280 generic-all
sun/security/smartcardio/TestTransmit.java 8039280 generic-all
com/sun/security/auth/callback/TextCallbackHandler/Password.java 8039280 generic-all
com/sun/security/sasl/gsskerb/AuthOnly.java 8039280 generic-all
com/sun/security/sasl/gsskerb/ConfSecurityLayer.java 8039280 generic-all
com/sun/security/sasl/gsskerb/NoSecurityLayer.java 8039280 generic-all
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/TEST.groups
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,6 @@ jdk_security_manual_no_input = \
:jdk_security_infra \
com/sun/crypto/provider/Cipher/AEAD/GCMIncrementByte4.java \
com/sun/crypto/provider/Cipher/AEAD/GCMIncrementDirect4.java \
com/sun/security/auth/callback/TextCallbackHandler/Password.java \
com/sun/security/sasl/gsskerb/AuthOnly.java \
com/sun/security/sasl/gsskerb/ConfSecurityLayer.java \
com/sun/security/sasl/gsskerb/NoSecurityLayer.java \
Expand Down Expand Up @@ -601,6 +600,7 @@ jdk_core_manual_interactive = \
jdk_security_manual_interactive = \
sun/security/tools/keytool/i18n.java \
java/security/Policy/Root/Root.java \
com/sun/security/auth/callback/TextCallbackHandler/Password.java \
sun/security/krb5/config/native/TestDynamicStore.java

# Test sets for running inside container environment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -23,11 +23,23 @@

/*
* @test
* @bug 6825240
* @bug 6825240 6829785
* @summary Password.readPassword() echos the input when System.Console is null
* @run main/manual Password
*/

/*
* This scenario cannot be automated because util/Password.java verifies the given input stream is
* equal to the initialSystemIn. This prevents the test from providing a custom input stream.
*
* Steps to run the test:
* 1) Compile the class using the JDK version being tested: '<JdkBin>/javac Password.java'
* 2) Run the test using the JDK version being tested: '<JdkBin>/java -cp . Password'
* 3) Type in the first password, it should not be visible in the console
* 4) Type in the second password, it should be visible in the console
* 5) The final output line displays the entered passwords, both should be visible
*/

import com.sun.security.auth.callback.TextCallbackHandler;
import javax.security.auth.callback.*;

Expand Down

0 comments on commit 4ba6947

Please sign in to comment.