Documentation ¶
Overview ¶
Package certtool is the public interface for integrating with auto generating certificates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadKeyPair ¶
func ReadKeyPair(publicCertFileData []byte, privateKeyFileData []byte) (*x509.Certificate, interface{}, error)
ReadKeyPair takes PEM-encoded public certificate/private key pairs and returns the Go classes for them so they can be used for encryption or signing.
Types ¶
type Args ¶
type Args struct { // CA indicates we need to create a CA certificate. CA bool // CommonName CommonName string // Country of the entity representing the certificate. Country string // Organization of the entity representing the certificate. Organization string // OrganizationalUnit of the entity representing the certificate. OrganizationalUnit string // Locality of the entity representing the certificate. Locality string // Province (or state) of the entity representing the certificate. Province string // Hostnames is a list of hostname (optional :port) of the endpoint used by the certificate. Hostnames []string // Validity is how long the certificate should be valid for. Validity time.Duration // ParentKeyPair is the root public certificate within the chain of trust. ParentKeyPair *KeyPair // KeyType is the type of key to generate. KeyType *KeyType }
Args of creating a self-signed X.509 public certificate/private key pair.
func (*Args) GetKeyType ¶
type KeyPair ¶
type KeyPair struct { // PublicCertificate of the X.509 key pair. PublicCertificate []byte // PrivateKey of the X.509 key pair. PrivateKey []byte }
KeyPair is the X.509 public certificate/private key pair
func GenerateAndWriteKeyPair ¶
func GenerateKeyPair ¶
Click to show internal directories.
Click to hide internal directories.