Documentation ¶
Index ¶
- Variables
- type Attribute
- type AttributeRequest
- type Attributes
- type Mgr
- func (mgr *Mgr) AddAttributesToCert(attrs *Attributes, cert *x509.Certificate) error
- func (mgr *Mgr) GetAttributesFromCert(cert *x509.Certificate) (*Attributes, error)
- func (mgr *Mgr) GetAttributesFromIdemix(creator []byte) (*Attributes, error)
- func (mgr *Mgr) ProcessAttributeRequests(requests []AttributeRequest, attributes []Attribute) (*Attributes, error)
- func (mgr *Mgr) ProcessAttributeRequestsForCert(requests []AttributeRequest, attributes []Attribute, cert *x509.Certificate) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //attroid是ASN.1对象标识符,用于 //X509证书 AttrOID = asn1.ObjectIdentifier{1, 2, 3, 4, 5, 6, 7, 8, 1} //AttroidString是Attroid的字符串版本 AttrOIDString = "1.2.3.4.5.6.7.8.1" )
Functions ¶
This section is empty.
Types ¶
type AttributeRequest ¶
type AttributeRequest interface { //getname返回属性的名称 GetName() string //如果需要属性,isRequired返回true IsRequired() bool }
attributeRequest是对属性的请求
type Attributes ¶
属性包含属性名称和值
func (*Attributes) True ¶
func (a *Attributes) True(name string) error
如果属性“name”的值为true,则返回nil; 否则,将返回适当的错误。
type Mgr ¶
type Mgr struct{}
mgr是属性管理器,是此包的主要对象
func (*Mgr) AddAttributesToCert ¶
func (mgr *Mgr) AddAttributesToCert(attrs *Attributes, cert *x509.Certificate) error
addattributestocert将公共属性信息添加到X509证书中。
func (*Mgr) GetAttributesFromCert ¶
func (mgr *Mgr) GetAttributesFromCert(cert *x509.Certificate) (*Attributes, error)
getattributesfromcert从证书获取属性。
func (*Mgr) GetAttributesFromIdemix ¶
func (mgr *Mgr) GetAttributesFromIdemix(creator []byte) (*Attributes, error)
func (*Mgr) ProcessAttributeRequests ¶
func (mgr *Mgr) ProcessAttributeRequests(requests []AttributeRequest, attributes []Attribute) (*Attributes, error)
processAttributeRequests接受一个属性请求数组和一个标识的属性 并返回包含请求的属性的属性对象。
func (*Mgr) ProcessAttributeRequestsForCert ¶
func (mgr *Mgr) ProcessAttributeRequestsForCert(requests []AttributeRequest, attributes []Attribute, cert *x509.Certificate) error
processAttributeRequestsForcert将属性添加到给定的X509证书 属性请求和属性。
Click to show internal directories.
Click to hide internal directories.