gss

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const GssStateAcceptCompleted = 0
View Source
const GssStateAcceptIncomplete = 1
View Source
const GssStateReject = 2
View Source
const GssStateRequestMic = 3
View Source
const SPNEGOOID = "1.3.6.1.5.5.2"

Variables

This section is empty.

Functions

func ObjectIDStrToInt

func ObjectIDStrToInt(oid string) ([]int, error)

Types

type NegTokenInit

type NegTokenInit struct {
	OID  asn1.ObjectIdentifier //SPNEGO GSSAPI协商安全机制
	Data NegTokenInitData      `asn1:"explicit"` //NegTokenInit的扩展NegTokenInit2
}

func NewNegTokenInit

func NewNegTokenInit() (NegTokenInit, error)

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 NegTokenInitData struct {
	MechTypes    []asn1.ObjectIdentifier `asn1:"explicit,tag:0"`                    //身份验证列表,遵循RFC4178标准
	ReqFlags     asn1.BitString          `asn1:"explicit,optional,omitempty,tag:1"` //上下文标志,发送方忽略该标志
	MechToken    []byte                  `asn1:"explicit,optional,omitempty,tag:2"` //令牌,8位可选字符串
	MechTokenMIC []byte                  `asn1:"explicit,optional,omitempty,tag:3"` //消息完整性令牌
}

type NegTokenResp

type NegTokenResp struct {
	// RFC4178 4.2.2
	NegState      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

Jump to

Keyboard shortcuts

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