Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusBadBindings StatusBadMech StatusBadName StatusBadNameType )
View Source
const ( GssStateAcceptCompleted = 0 GssStateAcceptIncomplete = 1 GssStateReject = 2 GssStateRequestMic = 3 )
View Source
const ( KGUsageAcceptorSeal = 22 KGUsageAcceptorSign = 23 KGUsageInitiatorSeal = 24 KGUsageInitiatorSign = 25 )
View Source
const ( GssContextFlagDeleg = 1 GssContextFlagMutual = 1 GssContextFlagReplay = 4 GssContextFlagSequence = 8 GssContextFlagConf = 16 GssContextFlagInteg = 32 GssContextFlagAnon = 64 )
RFC 4121 Section 4.1.1.1 RFC 4178 Section 4.2.1 https://www.gnu.org/software/gss/reference/gss-api.html#GSS-C-DELEG-FLAG:CAPS
Variables ¶
View Source
var KerberosSSPMechTypeOid = asn1.ObjectIdentifier([]int{1, 2, 840, 113554, 1, 2, 2})
View Source
var MsKerberosOid = asn1.ObjectIdentifier([]int{1, 2, 840, 48018, 1, 2, 2})
View Source
var NtLmSSPMechTypeOid = asn1.ObjectIdentifier([]int{1, 3, 6, 1, 4, 1, 311, 2, 2, 10})
View Source
var SpnegoOid = asn1.ObjectIdentifier([]int{1, 3, 6, 1, 5, 5, 2})
Functions ¶
func NewNegTokenInit ¶
func NewNegTokenInit(types []asn1.ObjectIdentifier, token []byte) ([]byte, error)
func ObjectIDStrToInt ¶
Types ¶
type Mechanism ¶ added in v0.5.0
type Mechanism interface {
Oid() asn1.ObjectIdentifier
InitSecContext([]byte) ([]byte, error) // GSS_Init_sec_context
AcceptSecContext([]byte) ([]byte, error) // GSS_Accept_sec_context
Sum([]byte) []byte // GSS_getMIC
SessionKey() []byte // QueryContextAttributes(ctx, SECPKG_ATTR_SESSION_KEY, &out)
IsNullSession() bool
GetUsername() string
Logoff()
}
RFC4178 Interface to define a security mechanism available for the initiator
type NegTokenInit ¶
type NegTokenInit struct {
OID asn1.ObjectIdentifier
Data NegTokenInitData `asn1:"explicit"`
}
func (*NegTokenInit) MarshalBinary ¶
func (n *NegTokenInit) MarshalBinary(meta *encoder.Metadata) ([]byte, error)
func (*NegTokenInit) UnmarshalBinary ¶
func (n *NegTokenInit) UnmarshalBinary(buf []byte, meta *encoder.Metadata) error
type NegTokenInitData ¶
type NegTokenResp ¶
type NegTokenResp struct {
State asn1.Enumerated `asn1:"explicit,optional,omitempty,tag:0"`
SupportedMech asn1.ObjectIdentifier `asn1:"explicit,optional,omitempty,tag:1"`
ResponseToken []byte `asn1:"explicit,optional,omitempty,tag:2"`
MechListMIC []byte `asn1:"explicit,optional,omitempty,tag:3"`
}
func NewNegTokenResp ¶
func NewNegTokenResp() (NegTokenResp, error)
func (*NegTokenResp) MarshalBinary ¶
func (r *NegTokenResp) MarshalBinary(meta *encoder.Metadata) ([]byte, error)
func (*NegTokenResp) UnmarshalBinary ¶
func (r *NegTokenResp) UnmarshalBinary(buf []byte, meta *encoder.Metadata) error
Click to show internal directories.
Click to hide internal directories.