public class NtlmContext extends Object implements SSPContext
Modifier and Type | Field and Description |
---|---|
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
NTLMSSP_OID |
Constructor and Description |
---|
NtlmContext(CIFSContext tc,
NtlmPasswordAuthenticator auth,
boolean doSigning) |
Modifier and Type | Method and Description |
---|---|
byte[] |
calculateMIC(byte[] data) |
void |
dispose() |
int |
getFlags() |
String |
getNetbiosName() |
byte[] |
getServerChallenge() |
byte[] |
getSigningKey() |
org.bouncycastle.asn1.ASN1ObjectIdentifier[] |
getSupportedMechs() |
byte[] |
initSecContext(byte[] token,
int offset,
int len) |
boolean |
isEstablished() |
boolean |
isMICAvailable() |
boolean |
isPreferredMech(org.bouncycastle.asn1.ASN1ObjectIdentifier mechanism) |
boolean |
isSupported(org.bouncycastle.asn1.ASN1ObjectIdentifier mechanism) |
void |
setTargetName(String targetName) |
boolean |
supportsIntegrity() |
String |
toString() |
void |
verifyMIC(byte[] data,
byte[] mic) |
public NtlmContext(CIFSContext tc, NtlmPasswordAuthenticator auth, boolean doSigning)
tc
- context to useauth
- credentialsdoSigning
- whether signing is requestedpublic org.bouncycastle.asn1.ASN1ObjectIdentifier[] getSupportedMechs()
getSupportedMechs
in interface SSPContext
SSPContext.getSupportedMechs()
public int getFlags()
getFlags
in interface SSPContext
SSPContext.getFlags()
public boolean isSupported(org.bouncycastle.asn1.ASN1ObjectIdentifier mechanism)
isSupported
in interface SSPContext
SSPContext.isSupported(org.bouncycastle.asn1.ASN1ObjectIdentifier)
public boolean isPreferredMech(org.bouncycastle.asn1.ASN1ObjectIdentifier mechanism)
isPreferredMech
in interface SSPContext
SSPContext.isPreferredMech(org.bouncycastle.asn1.ASN1ObjectIdentifier)
public boolean isEstablished()
isEstablished
in interface SSPContext
public byte[] getServerChallenge()
public byte[] getSigningKey()
getSigningKey
in interface SSPContext
public String getNetbiosName()
getNetbiosName
in interface SSPContext
public void setTargetName(String targetName)
targetName
- the target's SPNpublic byte[] initSecContext(byte[] token, int offset, int len) throws SmbException
initSecContext
in interface SSPContext
SmbException
public boolean supportsIntegrity()
supportsIntegrity
in interface SSPContext
public boolean isMICAvailable()
isMICAvailable
in interface SSPContext
public byte[] calculateMIC(byte[] data) throws CIFSException
calculateMIC
in interface SSPContext
CIFSException
public void verifyMIC(byte[] data, byte[] mic) throws CIFSException
verifyMIC
in interface SSPContext
CIFSException
public void dispose() throws SmbException
dispose
in interface SSPContext
SmbException
SSPContext.dispose()
Copyright © 2019. All rights reserved.