ntlmssp

package module
v0.0.0-...-31973bb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: BSD-3-Clause Imports: 20 Imported by: 9

README

Build Status Coverage Status Go Report Card GoDoc Go version Go version

ntlmssp

Feature comparison:

Library NTLMv1 NTLMv2 Connection-orientated Connectionless Signing & sealing Channel Bindings Client Server Notes
https://github.com/bodgit/ntlmssp Yes Yes Yes No Yes Yes Yes No
https://github.com/Azure/go-ntlmssp No Yes Yes No No No Yes No HTTP only
https://github.com/ThomsonReutersEikon/go-ntlm Yes Yes No Yes No No Yes Yes Archived

Documentation

Index

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

This section is empty.

Functions

func DefaultDomain

func DefaultDomain() (string, error)

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

func DefaultWorkstation() (string, error)

DefaultWorkstation returns the current workstation name.

func SetCompatibilityLevel

func SetCompatibilityLevel(level lmCompatibilityLevel) func(*Client) error

func SetDomain

func SetDomain(domain string) func(*Client) error

func SetUserInfo

func SetUserInfo(username, password string) func(*Client) error

func SetVersion

func SetVersion(version *Version) func(*Client) error

func SetWorkstation

func SetWorkstation(workstation string) func(*Client) error

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 NewClient

func NewClient(options ...func(*Client) error) (*Client, error)

func (*Client) Authenticate

func (c *Client) Authenticate(input []byte, bindings *ChannelBindings) ([]byte, error)

func (*Client) Complete

func (c *Client) Complete() bool

func (*Client) SecuritySession

func (c *Client) SecuritySession() *SecuritySession

func (*Client) SetOption

func (c *Client) SetOption(options ...func(*Client) error) error

type SecuritySession

type SecuritySession struct {
	// contains filtered or unexported fields
}

func (*SecuritySession) Unwrap

func (s *SecuritySession) Unwrap(b, signature []byte) ([]byte, error)

func (*SecuritySession) Wrap

func (s *SecuritySession) Wrap(b []byte) ([]byte, []byte, error)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL