HTTPCLIENT-1079: Fixed Kerberos cross-realm support

Contributed by Michael Osipov <1983-01-06 at gmx.net> 


git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1091904 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2011-04-13 20:27:27 +00:00
parent 281d9d5f4d
commit bc70b1839a
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,8 @@
Changes since 4.1.1
* [HTTPCLIENT-1079] Fixed Kerberos cross-realm support
Contributed by Michael Osipov <1983-01-06 at gmx.net>
* [HTTPCLIENT-1078] Decompressing entities (DeflateDecompressingEntity, GzipDecompressingEntity)
do not close content stream in #writeTo() method.
Contributed by Oleg Kalnichevski <olegk at apache.org>

View File

@ -198,7 +198,7 @@ public class NegotiateScheme extends AuthSchemeBase {
boolean tryKerberos = false;
try {
GSSManager manager = getManager();
GSSName serverName = manager.createName("HTTP/" + authServer, null);
GSSName serverName = manager.createName("HTTP@" + authServer, GSSName.NT_HOSTBASED_SERVICE);
gssContext = manager.createContext(
serverName.canonicalize(negotiationOid), negotiationOid, null,
GSSContext.DEFAULT_LIFETIME);
@ -220,7 +220,7 @@ public class NegotiateScheme extends AuthSchemeBase {
log.debug("Using Kerberos MECH " + KERBEROS_OID);
negotiationOid = new Oid(KERBEROS_OID);
GSSManager manager = getManager();
GSSName serverName = manager.createName("HTTP/" + authServer, null);
GSSName serverName = manager.createName("HTTP@" + authServer, GSSName.NT_HOSTBASED_SERVICE);
gssContext = manager.createContext(
serverName.canonicalize(negotiationOid), negotiationOid, null,
GSSContext.DEFAULT_LIFETIME);