8038079: Re-examine integration of SPNEGO authentication
authorprappo
Tue, 13 Dec 2016 12:26:18 +0000
changeset 42688 b43174398bd8
parent 42472 e72326db071c
child 42689 a3fcfc8b67e3
8038079: Re-examine integration of SPNEGO authentication Summary: @module tags have been removed from the HttpNegotiateServer.java as it turns out exactly the same lines have been already defined in TEST.properties sitting in the same folder Reviewed-by: chegar, dfuchs
jdk/src/java.base/share/classes/sun/net/www/protocol/http/Negotiator.java
jdk/src/java.security.jgss/share/classes/module-info.java
jdk/test/ProblemList.txt
jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/Negotiator.java	Sun Dec 11 21:55:03 2016 -0800
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/Negotiator.java	Tue Dec 13 12:26:18 2016 +0000
@@ -48,7 +48,9 @@
         Class<?> clazz;
         Constructor<?> c;
         try {
-            clazz = Class.forName("sun.net.www.protocol.http.spnego.NegotiatorImpl", true, null);
+            clazz = Class.forName("sun.net.www.protocol.http.spnego.NegotiatorImpl",
+                                  true,
+                                  ClassLoader.getPlatformClassLoader());
             c = clazz.getConstructor(HttpCallerInfo.class);
         } catch (ClassNotFoundException cnfe) {
             finest(cnfe);
--- a/jdk/src/java.security.jgss/share/classes/module-info.java	Sun Dec 11 21:55:03 2016 -0800
+++ b/jdk/src/java.security.jgss/share/classes/module-info.java	Tue Dec 13 12:26:18 2016 +0000
@@ -42,6 +42,12 @@
         jdk.security.jgss;
     exports sun.security.krb5.internal.ktab to
         jdk.security.auth;
+
+    // Opens for reflective instantiation of sun.net.www.protocol.http.spnego.NegotiatorImpl
+    // to sun.net.www.protocol.http.HttpURLConnection
+    opens sun.net.www.protocol.http.spnego to
+        java.base;
+
     provides java.security.Provider with sun.security.jgss.SunProvider;
     provides sun.security.ssl.ClientKeyExchangeService
         with sun.security.krb5.internal.ssl.Krb5KeyExchangeService;
--- a/jdk/test/ProblemList.txt	Sun Dec 11 21:55:03 2016 -0800
+++ b/jdk/test/ProblemList.txt	Tue Dec 13 12:26:18 2016 +0000
@@ -215,8 +215,6 @@
 
 sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java      8026393 generic-all
 
-sun/security/krb5/auto/HttpNegotiateServer.java                 8038079 generic-all
-
 sun/security/ssl/SSLSocketImpl/AsyncSSLSocketClose.java         8161232 macosx-all
 
 sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java  8171043 windows-all
--- a/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java	Sun Dec 11 21:55:03 2016 -0800
+++ b/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java	Tue Dec 13 12:26:18 2016 +0000
@@ -24,13 +24,6 @@
 /*
  * @test
  * @bug 6578647 6829283
- * @modules java.base/sun.security.util
- *          java.security.jgss/sun.security.jgss
- *          java.security.jgss/sun.security.krb5
- *          java.security.jgss/sun.security.krb5.internal
- *          java.security.jgss/sun.security.krb5.internal.ccache
- *          java.security.jgss/sun.security.krb5.internal.crypto
- *          java.security.jgss/sun.security.krb5.internal.ktab
  * @run main/othervm HttpNegotiateServer
  * @summary Undefined requesting URL in java.net.Authenticator.getPasswordAuthentication()
  * @summary HTTP/Negotiate: Authenticator triggered again when user cancels the first one