Documentation ¶
Index ¶
- func GenerateRsaKey() (*rsa.PrivateKey, error)
- type CA
- type CertificateWithKey
- func (c *CertificateWithKey) CertificateToFile(filename string, perm os.FileMode) error
- func (c *CertificateWithKey) CertificateToPem() []byte
- func (c *CertificateWithKey) KeyToFile(filename string, perm os.FileMode) error
- func (c *CertificateWithKey) KeyToPem() []byte
- func (c *CertificateWithKey) RequestToFile(filename string, perm os.FileMode) error
- func (c *CertificateWithKey) RequestToPem() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRsaKey ¶
func GenerateRsaKey() (*rsa.PrivateKey, error)
Types ¶
type CA ¶
type CA struct {
CertificateWithKey
}
func (*CA) MustNewCertificate ¶
func (c *CA) MustNewCertificate(subject string) *CertificateWithKey
func (*CA) NewCertificate ¶
func (c *CA) NewCertificate(subject string) (*CertificateWithKey, error)
type CertificateWithKey ¶
type CertificateWithKey struct { Key *rsa.PrivateKey Certificate *x509.Certificate SignedCertificate []byte Request *x509.CertificateRequest SignedRequest []byte }
func (*CertificateWithKey) CertificateToFile ¶
func (c *CertificateWithKey) CertificateToFile(filename string, perm os.FileMode) error
func (*CertificateWithKey) CertificateToPem ¶
func (c *CertificateWithKey) CertificateToPem() []byte
func (*CertificateWithKey) KeyToFile ¶
func (c *CertificateWithKey) KeyToFile(filename string, perm os.FileMode) error
func (*CertificateWithKey) KeyToPem ¶
func (c *CertificateWithKey) KeyToPem() []byte
func (*CertificateWithKey) RequestToFile ¶
func (c *CertificateWithKey) RequestToFile(filename string, perm os.FileMode) error
func (*CertificateWithKey) RequestToPem ¶
func (c *CertificateWithKey) RequestToPem() []byte
Click to show internal directories.
Click to hide internal directories.