Documentation ¶
Index ¶
- Variables
- func ExtKeyUsageFromString(ekuName string) (x509.ExtKeyUsage, error)
- func KeyUsageFromString(bitName string) (x509.KeyUsage, error)
- type KeyUsage
- func (u KeyUsage) Clone() KeyUsage
- func (a KeyUsage) Equals(b KeyUsage) bool
- func (ku KeyUsage) Preset() string
- func (u KeyUsage) ToProtoStruct() *pb.KeyUsage
- func (p *KeyUsage) UnmarshalFlag(s string) error
- func (u *KeyUsage) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (u KeyUsage) Verify() error
Constants ¶
This section is empty.
Variables ¶
View Source
var KeyUsageCA = KeyUsage{ KeyUsage: x509.KeyUsageCertSign | x509.KeyUsageCRLSign, ExtKeyUsages: nil, }
View Source
var KeyUsageTLSClient = KeyUsage{ KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, ExtKeyUsages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}, }
View Source
var KeyUsageTLSClientServer = KeyUsage{ KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, ExtKeyUsages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth}, }
View Source
var KeyUsageTLSServer = KeyUsage{ KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, ExtKeyUsages: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, }
Functions ¶
func ExtKeyUsageFromString ¶ added in v0.2.2
func ExtKeyUsageFromString(ekuName string) (x509.ExtKeyUsage, error)
Types ¶
type KeyUsage ¶
type KeyUsage struct { KeyUsage x509.KeyUsage ExtKeyUsages []x509.ExtKeyUsage }
func FromCertificate ¶
func FromCertificate(cert *x509.Certificate) KeyUsage
func FromProtoStruct ¶
func PresetFromString ¶
func (KeyUsage) ToProtoStruct ¶
func (*KeyUsage) UnmarshalFlag ¶
func (*KeyUsage) UnmarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.