提交 e445913b 编写于 作者: W weijun

8044215: Unable to initiate SpNego using a S4U2Proxy GSSCredential (Krb5ProxyCredential)

Reviewed-by: mullan
上级 e52dd609
...@@ -241,8 +241,11 @@ class Krb5Context implements GSSContextSpi { ...@@ -241,8 +241,11 @@ class Krb5Context implements GSSContextSpi {
* establishment. * establishment.
*/ */
public final void requestCredDeleg(boolean value) throws GSSException { public final void requestCredDeleg(boolean value) throws GSSException {
if (state == STATE_NEW && isInitiator()) if (state == STATE_NEW && isInitiator()) {
credDelegState = value; if (myCred == null || !(myCred instanceof Krb5ProxyCredential)) {
credDelegState = value;
}
}
} }
/** /**
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
/* /*
* @test * @test
* @bug 6355584 * @bug 6355584 8044215
* @summary Introduce constrained Kerberos delegation * @summary Introduce constrained Kerberos delegation
* @compile -XDignore.symbol.file S4U2proxy.java * @compile -XDignore.symbol.file S4U2proxy.java
* @run main/othervm S4U2proxy krb5 * @run main/othervm S4U2proxy krb5
...@@ -69,6 +69,10 @@ public class S4U2proxy { ...@@ -69,6 +69,10 @@ public class S4U2proxy {
Context p = s.delegated(); Context p = s.delegated();
p.startAsClient(OneKDC.BACKEND, mech); p.startAsClient(OneKDC.BACKEND, mech);
// 8044215: requestCredDeleg is useless and harmless
p.x().requestCredDeleg(true);
b.startAsServer(mech); b.startAsServer(mech);
Context.handshake(p, b); Context.handshake(p, b);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册