Class NTLMEngineImpl.Type3Message
- java.lang.Object
-
- org.apache.hc.client5.http.impl.auth.NTLMEngineImpl.NTLMMessage
-
- org.apache.hc.client5.http.impl.auth.NTLMEngineImpl.Type3Message
-
- Enclosing class:
- NTLMEngineImpl
static class NTLMEngineImpl.Type3Message extends NTLMEngineImpl.NTLMMessage
Type 3 message assembly class
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
computeMic
(package private) byte[]
domainBytes
(package private) byte[]
exportedSessionKey
(package private) byte[]
hostBytes
(package private) byte[]
lmResp
(package private) byte[]
ntResp
(package private) byte[]
sessionKey
(package private) byte[]
type1Message
(package private) int
type2Flags
(package private) byte[]
type2Message
(package private) byte[]
userBytes
-
Fields inherited from class org.apache.hc.client5.http.impl.auth.NTLMEngineImpl.NTLMMessage
currentOutputPosition, messageContents
-
-
Constructor Summary
Constructors Constructor Description Type3Message(java.lang.String domain, java.lang.String host, java.lang.String user, char[] password, byte[] nonce, int type2Flags, java.lang.String target, byte[] targetInformation)
More primitive constructor: don't include cert or previous messages.Type3Message(java.lang.String domain, java.lang.String host, java.lang.String user, char[] password, byte[] nonce, int type2Flags, java.lang.String target, byte[] targetInformation, java.security.cert.Certificate peerServerCertificate, byte[] type1Message, byte[] type2Message)
Constructor.Type3Message(java.util.Random random, long currentTime, java.lang.String domain, java.lang.String host, java.lang.String user, char[] password, byte[] nonce, int type2Flags, java.lang.String target, byte[] targetInformation)
More primitive constructor: don't include cert or previous messages.Type3Message(java.util.Random random, long currentTime, java.lang.String domain, java.lang.String host, java.lang.String user, char[] password, byte[] nonce, int type2Flags, java.lang.String target, byte[] targetInformation, java.security.cert.Certificate peerServerCertificate, byte[] type1Message, byte[] type2Message)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private byte[]
addGssMicAvsToTargetInfo(byte[] originalTargetInfo, java.security.cert.Certificate peerServerCertificate)
Add GSS channel binding hash and MIC flag to the targetInfo.(package private) void
buildMessage()
Assemble the responsebyte[]
getEncryptedRandomSessionKey()
byte[]
getExportedSessionKey()
-
Methods inherited from class org.apache.hc.client5.http.impl.auth.NTLMEngineImpl.NTLMMessage
addByte, addBytes, addULong, addUShort, getBytes, getMessageLength, getPreambleLength, getResponse, prepareResponse, readByte, readBytes, readSecurityBuffer, readULong, readUShort
-
-
-
-
Field Detail
-
type1Message
final byte[] type1Message
-
type2Message
final byte[] type2Message
-
type2Flags
final int type2Flags
-
domainBytes
final byte[] domainBytes
-
hostBytes
final byte[] hostBytes
-
userBytes
final byte[] userBytes
-
lmResp
byte[] lmResp
-
ntResp
byte[] ntResp
-
sessionKey
final byte[] sessionKey
-
exportedSessionKey
final byte[] exportedSessionKey
-
computeMic
final boolean computeMic
-
-
Constructor Detail
-
Type3Message
Type3Message(java.lang.String domain, java.lang.String host, java.lang.String user, char[] password, byte[] nonce, int type2Flags, java.lang.String target, byte[] targetInformation) throws NTLMEngineException
More primitive constructor: don't include cert or previous messages.- Throws:
NTLMEngineException
-
Type3Message
Type3Message(java.util.Random random, long currentTime, java.lang.String domain, java.lang.String host, java.lang.String user, char[] password, byte[] nonce, int type2Flags, java.lang.String target, byte[] targetInformation) throws NTLMEngineException
More primitive constructor: don't include cert or previous messages.- Throws:
NTLMEngineException
-
Type3Message
Type3Message(java.lang.String domain, java.lang.String host, java.lang.String user, char[] password, byte[] nonce, int type2Flags, java.lang.String target, byte[] targetInformation, java.security.cert.Certificate peerServerCertificate, byte[] type1Message, byte[] type2Message) throws NTLMEngineException
Constructor. Pass the arguments we will need- Throws:
NTLMEngineException
-
Type3Message
Type3Message(java.util.Random random, long currentTime, java.lang.String domain, java.lang.String host, java.lang.String user, char[] password, byte[] nonce, int type2Flags, java.lang.String target, byte[] targetInformation, java.security.cert.Certificate peerServerCertificate, byte[] type1Message, byte[] type2Message) throws NTLMEngineException
Constructor. Pass the arguments we will need- Throws:
NTLMEngineException
-
-
Method Detail
-
getEncryptedRandomSessionKey
public byte[] getEncryptedRandomSessionKey()
-
getExportedSessionKey
public byte[] getExportedSessionKey()
-
buildMessage
void buildMessage()
Assemble the response- Overrides:
buildMessage
in classNTLMEngineImpl.NTLMMessage
-
addGssMicAvsToTargetInfo
private byte[] addGssMicAvsToTargetInfo(byte[] originalTargetInfo, java.security.cert.Certificate peerServerCertificate) throws NTLMEngineException
Add GSS channel binding hash and MIC flag to the targetInfo. Looks like this is needed if we want to use exported session key for GSS wrapping.- Throws:
NTLMEngineException
-
-