tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1559562 - /tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
Date Sun, 19 Jan 2014 19:26:10 GMT
Author: markt
Date: Sun Jan 19 19:26:09 2014
New Revision: 1559562

URL: http://svn.apache.org/r1559562
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56013
IBM JDK only understands indefinite lifetime

Modified:
    tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java

Modified: tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java?rev=1559562&r1=1559561&r2=1559562&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java (original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java Sun Jan 19
19:26:09 2014
@@ -28,6 +28,7 @@ import javax.security.auth.login.LoginCo
 import javax.security.auth.login.LoginException;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.catalina.Globals;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.connector.Request;
 import org.apache.juli.logging.Log;
@@ -215,12 +216,19 @@ public class SpnegoAuthenticator extends
             // Assume the GSSContext is stateless
             // TODO: Confirm this assumption
             final GSSManager manager = GSSManager.getInstance();
+            // IBM JDK only understands indefinite lifetime
+            final int credentialLifetime;
+            if (Globals.IS_IBM_JVM) {
+                credentialLifetime = GSSCredential.INDEFINITE_LIFETIME;
+            } else {
+                credentialLifetime = GSSCredential.DEFAULT_LIFETIME;
+            }
             final PrivilegedExceptionAction<GSSCredential> action =
                 new PrivilegedExceptionAction<GSSCredential>() {
                     @Override
                     public GSSCredential run() throws GSSException {
                         return manager.createCredential(null,
-                                GSSCredential.DEFAULT_LIFETIME,
+                                credentialLifetime,
                                 new Oid("1.3.6.1.5.5.2"),
                                 GSSCredential.ACCEPT_ONLY);
                     }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message