Documentation ¶
Index ¶
- Constants
- func SerialNumber() *big.Int
- type Cert
- func (c *Cert) Expires() time.Time
- func (c *Cert) IsCA() bool
- func (c *Cert) IsValid() error
- func (c *Cert) KeyType() string
- func (c *Cert) MarshalJSON() ([]byte, error)
- func (c *Cert) Serial() string
- func (c *Cert) String() string
- func (c *Cert) Subject() string
- func (c *Cert) WriteCertificate(w io.Writer) error
- func (c *Cert) WritePrivateKey(w io.Writer) error
- type Opt
Constants ¶
View Source
const ( ED25519 keyType RSA2048 P224 P256 P384 P521 )
Variables ¶
This section is empty.
Functions ¶
func SerialNumber ¶
Create a new serial number for the certificate, or nil if there was an error
Types ¶
type Cert ¶
type Cert struct {
// contains filtered or unexported fields
}
Cert represents a certificate with a private key which can be used for signing other certificates
func NewCert ¶
Create a new certificate, either self-signed (if ca is nil) or signed by the certificate authority with the given options
func NewFromBytes ¶
Import certificate from byte stream
func (*Cert) MarshalJSON ¶
func (*Cert) WriteCertificate ¶
Write a .pem file with the certificate
Click to show internal directories.
Click to hide internal directories.