8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test 26 * @bug 6911951 7150092 27 * @summary NTLM should be a supported Java SASL mechanism 28 */ 29 import java.io.IOException; 30 import javax.security.sasl.*; 31 import javax.security.auth.callback.*; 32 import java.util.*; 33 34 public class NTLMTest { 35 36 private static final String MECH = "NTLM"; 37 private static final String REALM = "REALM"; 38 private static final String PROTOCOL = "jmx"; 39 private static final byte[] EMPTY = new byte[0]; 40 41 private static final String USER1 = "dummy"; 42 private static final char[] PASS1 = "bogus".toCharArray(); 43 private static final String USER2 = "foo"; 44 private static final char[] PASS2 = "bar".toCharArray(); 45 46 private static final Map<String,char[]> maps = 47 new HashMap<String,char[]>(); | 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test 26 * @bug 6911951 7150092 27 * @summary NTLM should be a supported Java SASL mechanism 28 * @modules java.base/sun.misc 29 * java.security.sasl 30 */ 31 import java.io.IOException; 32 import javax.security.sasl.*; 33 import javax.security.auth.callback.*; 34 import java.util.*; 35 36 public class NTLMTest { 37 38 private static final String MECH = "NTLM"; 39 private static final String REALM = "REALM"; 40 private static final String PROTOCOL = "jmx"; 41 private static final byte[] EMPTY = new byte[0]; 42 43 private static final String USER1 = "dummy"; 44 private static final char[] PASS1 = "bogus".toCharArray(); 45 private static final String USER2 = "foo"; 46 private static final char[] PASS2 = "bar".toCharArray(); 47 48 private static final Map<String,char[]> maps = 49 new HashMap<String,char[]>(); |