Documentation
¶
Index ¶
- Variables
- func EncodeNegTokenInit(types []asn1.ObjectIdentifier, token []byte) (bs []byte, err error)
- func EncodeNegTokenResp(state asn1.Enumerated, typ asn1.ObjectIdentifier, token, mechListMIC []byte) (bs []byte, err error)
- type InitialContextToken
- type Initiator
- type NegTokenInit
- type NegTokenResp
- type SpnegoClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SpnegoOid = asn1.ObjectIdentifier([]int{1, 3, 6, 1, 5, 5, 2}) MsKerberosOid = asn1.ObjectIdentifier([]int{1, 2, 840, 48018, 1, 2, 2}) KerberosOid = asn1.ObjectIdentifier([]int{1, 2, 840, 113554, 1, 2, 2}) NlmpOid = asn1.ObjectIdentifier([]int{1, 3, 6, 1, 4, 1, 311, 2, 2, 10}) )
View Source
var NegHints = asn1.RawValue{ FullBytes: []byte{ 0xa3, 0x2a, 0x30, 0x28, 0xa0, 0x26, 0x1b, 0x24, 0x6e, 0x6f, 0x74, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x52, 0x46, 0x43, 0x34, 0x31, 0x37, 0x38, 0x40, 0x70, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, }, }
"not_defined_in_RFC4178@please_ignore"
Functions ¶
func EncodeNegTokenInit ¶
func EncodeNegTokenInit(types []asn1.ObjectIdentifier, token []byte) (bs []byte, err error)
func EncodeNegTokenResp ¶
func EncodeNegTokenResp(state asn1.Enumerated, typ asn1.ObjectIdentifier, token, mechListMIC []byte) (bs []byte, err error)
Types ¶
type InitialContextToken ¶
type InitialContextToken struct {
ThisMech asn1.ObjectIdentifier `asn1:"optional"`
Init []NegTokenInit `asn1:"optional,explict,tag:0"`
Resp []NegTokenResp `asn1:"optional,explict,tag:1"`
}
type Initiator ¶
type Initiator interface {
GetOID() asn1.ObjectIdentifier
InitSecContext() ([]byte, error) // GSS_Init_sec_context
AcceptSecContext(sc []byte) ([]byte, error) // GSS_Accept_sec_context
GetMIC(bs []byte) []byte // GSS_getMIC
SessionKey() []byte // QueryContextAttributes(ctx, SECPKG_ATTR_SESSION_KEY, &out)
}
type NegTokenInit ¶
type NegTokenInit struct {
MechTypes []asn1.ObjectIdentifier `asn1:"explicit,optional,tag:0"`
ReqFlags asn1.BitString `asn1:"explicit,optional,tag:1"`
MechToken []byte `asn1:"explicit,optional,tag:2"`
MechListMIC []byte `asn1:"explicit,optional,tag:3"`
}
func DecodeNegTokenInit ¶
func DecodeNegTokenInit(bs []byte) (*NegTokenInit, error)
type NegTokenResp ¶
type NegTokenResp struct {
NegState asn1.Enumerated `asn1:"optional,explicit,tag:0"`
SupportedMech asn1.ObjectIdentifier `asn1:"optional,explicit,tag:1"`
ResponseToken []byte `asn1:"optional,explicit,tag:2"`
MechListMIC []byte `asn1:"optional,explicit,tag:3"`
}
func DecodeNegTokenResp ¶
func DecodeNegTokenResp(bs []byte) (*NegTokenResp, error)
type SpnegoClient ¶
type SpnegoClient struct {
Mechs []Initiator
MechTypes []asn1.ObjectIdentifier
SelectedMech Initiator
}
func NewSpnegoClient ¶
func NewSpnegoClient(mechs []Initiator) *SpnegoClient
func (*SpnegoClient) AcceptSecContext ¶
func (c *SpnegoClient) AcceptSecContext(negTokenRespBytes []byte) ([]byte, error)
func (*SpnegoClient) GetMIC ¶
func (c *SpnegoClient) GetMIC(bs []byte) []byte
func (*SpnegoClient) GetOID ¶
func (c *SpnegoClient) GetOID() asn1.ObjectIdentifier
func (*SpnegoClient) InitSecContext ¶
func (c *SpnegoClient) InitSecContext() ([]byte, error)
func (*SpnegoClient) SessionKey ¶
func (c *SpnegoClient) SessionKey() []byte
Click to show internal directories.
Click to hide internal directories.