Documentation
¶
Index ¶
- Constants
- Variables
- func ExtractCertificateSubject(certPEM string) (*pkix.Name, error)
- func FormatSubject(name, certType, certPEM string) (string, error)
- func GenerateCACert(commonName string, subject *pkix.Name) ([]byte, []byte, error)
- func GenerateChildCert(commonName string, isClient bool, caCert *x509.Certificate, ...) ([]byte, []byte, error)
- func RandomSubject(commonName string) *pkix.Name
- func RsaKeySize() int
- func SaveToPEMFile(filename string, pemData []byte) error
Constants ¶
View Source
const ( OperatorCA = iota + 1 ListenerCA ImplantCA RootCA )
View Source
const ( // RSAKey - Namespace for RSA keys RSAKey = "rsa" RootName = "Root" RootCert = "root_ca.pem" RootKey = "root_key.pem" ServerCert = "server_crt.pem" ServerKey = "server_key.pem" RootNamespace = "root" ListenerNamespace = "listener" // Listener servers ClientNamespace = "client" )
View Source
const ( Acme = "acme" SelfSigned = "self_signed" Imported = "imported" )
Variables ¶
View Source
var CertTypes = []string{ Acme, SelfSigned, Imported, }
Functions ¶
func ExtractCertificateSubject ¶ added in v0.1.1
ExtractCertificateSubject - 从证书PEM中提取subject信息
func FormatSubject ¶ added in v0.1.1
func GenerateCACert ¶
func GenerateChildCert ¶
func GenerateChildCert(commonName string, isClient bool, caCert *x509.Certificate, caKey *rsa.PrivateKey, userType string) ([]byte, []byte, error)
func RandomSubject ¶
func RsaKeySize ¶
func RsaKeySize() int
func SaveToPEMFile ¶
SaveToPEMFile save to PEM file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.