Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultDomain() (string, error)
- func DefaultWorkstation() (string, error)
- func SetCompatibilityLevel(level lmCompatibilityLevel) func(*Client) error
- func SetDomain(domain string) func(*Client) error
- func SetUserInfo(username, password string, nthash []byte) func(*Client) error
- func SetVersion(version *Version) func(*Client) error
- func SetWorkstation(workstation string) func(*Client) error
- type ChannelBindings
- type Client
- type SecuritySession
- type Version
Constants ¶
View Source
const (
DefaultClientCompatibilityLevel lmCompatibilityLevel = 3
)
View Source
const ( // NTLMSSPRevisionW2K3 is the current revision of NTLM. NTLMSSPRevisionW2K3 uint8 = 0x0f )
View Source
const ( // TLSServerEndPoint is defined in RFC 5929 and stores the hash of the server certificate. TLSServerEndPoint string = "tls-server-end-point" )
Variables ¶
View Source
var ( ErrChecksumMismatch = errors.New("checksum does not match") ErrSeqNumMismatch = errors.New("sequence number does not match") )
Functions ¶
func DefaultDomain ¶
DefaultDomain returns the Windows domain that the host is joined to. This will never be successful on non-Windows as there's no standard API.
func DefaultWorkstation ¶
DefaultWorkstation returns the current workstation name.
func SetCompatibilityLevel ¶
func SetVersion ¶
func SetWorkstation ¶
Types ¶
type ChannelBindings ¶
type ChannelBindings struct {
InitiatorAddrtype uint32
InitiatorAddress []uint8
AcceptorAddrtype uint32
AcceptorAddress []uint8
ApplicationData []uint8
}
ChannelBindings models the GSS-API channel bindings defined in RFC 2744.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Authenticate ¶
func (c *Client) Authenticate(input []byte, bindings *ChannelBindings) ([]byte, error)
func (*Client) Reset ¶
func (c *Client) Reset()
add Reset() method that clears only session state, not credentials/config:
- Zero out: complete, securitySession, negotiateMessage, challengeMessage, negotiatedFlags
- Leave untouched: username, password, domain, workstation, defaultFlags, version, compatibilityLevel
func (*Client) SecuritySession ¶
func (c *Client) SecuritySession() *SecuritySession
type SecuritySession ¶
type SecuritySession struct {
// contains filtered or unexported fields
}
type Version ¶
type Version struct {
ProductMajorVersion uint8
ProductMinorVersion uint8
ProductBuild uint16
NTLMRevisionCurrent uint8
// contains filtered or unexported fields
}
Version models the NTLM version passed in the various messages.
func DefaultVersion ¶
func DefaultVersion() *Version
DefaultVersion returns a pointer to a NTLM Version struct for the OS which will be populated on Windows or nil otherwise.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.