Documentation ¶
Index ¶
- Variables
- type Identity
- type Option
- func Issuer(value *Identity) Option
- func IssuingCertificateURL(value ...string) Option
- func KeyUsage(ku x509.KeyUsage) Option
- func NextSerialNumber(value int64) Option
- func NotAfter(value time.Time) Option
- func NotBefore(value time.Time) Option
- func OCSPServer(value ...string) Option
- func PrivateKey(value crypto.Signer) Option
- func Subject(value pkix.Name) Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultCountry is the default subject Country. DefaultCountry = []string{"US"} // DefaultProvince is the default subject Province. DefaultProvince = []string{"CA"} // DefaultLocality is the default subject Locality. DefaultLocality = []string{"San Francisco"} // DefaultStreetAddress is the default subject StreetAddress. DefaultStreetAddress = []string(nil) // DefaultPostalCode is the default subject PostalCode. DefaultPostalCode = []string(nil) // DefaultCommonName is the default subject CommonName. DefaultCommonName = "fakeca" )
Functions ¶
This section is empty.
Types ¶
type Identity ¶
type Identity struct { Issuer *Identity PrivateKey crypto.Signer Certificate *x509.Certificate NextSN int64 }
Identity is a certificate and private key.
func (*Identity) Chain ¶
func (id *Identity) Chain() []*x509.Certificate
Chain builds a slice of *x509.Certificate from this CA and its issuers.
func (*Identity) IncrementSN ¶
IncrementSN returns the next serial number.
type Option ¶
type Option option
Option is an option that can be passed to New().
IsCA is an Option for making an identity a certificate authority.
func IssuingCertificateURL ¶
IssuingCertificateURL is an Option for setting the identity's certificate's IssuingCertificateURL.
func NextSerialNumber ¶
NextSerialNumber is an Option that determines the SN of the next issued certificate.
func OCSPServer ¶
OCSPServer is an Option for setting the identity's certificate's OCSPServer.
func PrivateKey ¶
PrivateKey is an Option for setting the identity's private key.
Click to show internal directories.
Click to hide internal directories.