Documentation ¶
Index ¶
- Variables
- func GenerateX509Certificate(c *X509Simplified, parent *x509.Certificate, publicKey *rsa.PrivateKey, ...) ([]byte, error)
- func GenerateX509SelfSignedCertificate(c *X509Simplified, key *rsa.PrivateKey) ([]byte, error)
- func ReadPEM(cert []byte) (*x509.Certificate, error)
- func StringToDNSAddressList(dnsList string) []string
- func StringToExtKeyUsage(extKeyUsage string) ([]x509.ExtKeyUsage, error)
- func StringToIPAddressList(ipList string) ([]net.IP, error)
- func StringToKeyUsage(keyUsage string) (x509.KeyUsage, error)
- func WritePEM(cert []byte) (string, error)
- type Subject
- type X509Simplified
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // KeyUsageChoices is a set of string choices that map to the // X509 key usage representation KeyUsageChoices map[string]x509.KeyUsage // ExtKeyUsageChoices is a set of string choices that map to the // X509 extended key usage representation ExtKeyUsageChoices map[string]x509.ExtKeyUsage )
Functions ¶
func GenerateX509Certificate ¶
func GenerateX509Certificate(c *X509Simplified, parent *x509.Certificate, publicKey *rsa.PrivateKey, signingKey *rsa.PrivateKey) ([]byte, error)
GenerateX509Certificate using the passed parameters
func GenerateX509SelfSignedCertificate ¶
func GenerateX509SelfSignedCertificate(c *X509Simplified, key *rsa.PrivateKey) ([]byte, error)
GenerateX509SelfSignedCertificate takes a simplified x509 definition and an RSA key, and generates a certificate
func ReadPEM ¶
func ReadPEM(cert []byte) (*x509.Certificate, error)
ReadPEM reads a certificate from PEM format
func StringToDNSAddressList ¶
StringToDNSAddressList transforms a comma separated list of strings into an array
func StringToExtKeyUsage ¶
func StringToExtKeyUsage(extKeyUsage string) ([]x509.ExtKeyUsage, error)
StringToExtKeyUsage converts a string array into an extended key usage type
func StringToIPAddressList ¶
StringToIPAddressList transforms a comma separated list of strings into an IP array
func StringToKeyUsage ¶
StringToKeyUsage converts a string array into a key usage type
Types ¶
Click to show internal directories.
Click to hide internal directories.