Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertReaderWriter ¶
type KeyPair ¶
type KeyPair struct { Private *PrivateKey Public *PublicKey }
func GenerateKeyPair ¶
GenerateKeyPair creates a new RSA key pair
func NewKeyPair ¶
func NewKeyPair() *KeyPair
type KeyReaderWriter ¶
type PrivateKey ¶
type PrivateKey struct {
*rsa.PrivateKey
}
PrivateKey is a Golang structure which represents a Cryptographic key
func (*PrivateKey) PEMBlock ¶
func (k *PrivateKey) PEMBlock() []byte
func (*PrivateKey) ReadFile ¶
func (k *PrivateKey) ReadFile(path string) error
ReadFile loads the key from a PEM encoded file
func (*PrivateKey) String ¶
func (k *PrivateKey) String() string
String returns a PEM encoded version of the Key
func (*PrivateKey) WriteFile ¶
func (k *PrivateKey) WriteFile(path string) error
type PublicKey ¶ added in v0.3.0
type X509 ¶
type X509 struct {
*x509.Certificate
}
func GenerateCA ¶
func GenerateCA(name string, pk *PrivateKey) (*X509, error)
GenerateCA creates an X509 CA certificate
func GenerateLeaf ¶
func GenerateLeaf(name string, ipAddresses []string, dnsNames []string, rootCert *X509, rootKey *PrivateKey, leafKey *PrivateKey) (*X509, error)
GenerateLeaf creates an X509 leaf certificate
Click to show internal directories.
Click to hide internal directories.