Documentation ¶
Index ¶
- Variables
- func GenerateCACertificate(org string, bits int) ([]byte, []byte, error)
- func GenerateCert(hosts []string, caCert []byte, caKey []byte, org string, bits int) ([]byte, []byte, error)
- func GetPublicKey(priv interface{}) (*rsa.PublicKey, error)
- func GetServerTLSConfig(caCert, serverCert, serverKey []byte, allowInsecure bool) (*tls.Config, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotRSAPrivateKey = errors.New("private key is not an RSA key")
)
Functions ¶
func GenerateCACertificate ¶
GenerateCACertificate generates a new certificate authority from the specified org and bit size and returns the certificate and key as []byte, []byte
func GenerateCert ¶
func GenerateCert(hosts []string, caCert []byte, caKey []byte, org string, bits int) ([]byte, []byte, error)
GenerateCert generates a new certificate signed using the provided certificate authority certificate and key byte arrays. It will return the generated certificate and key as []byte, []byte
func GetPublicKey ¶
GetPublicKey returns the RSA public key for the specified private key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.