Documentation
¶
Index ¶
- func CertificateInfo(certPath string) (*x509.Certificate, error)
- func FormatIp(ipStr string) (string, error)
- func GenerateKey(root bool) (*rsa.PrivateKey, error)
- func GenerateRoot() (*x509.Certificate, *rsa.PrivateKey, error)
- func IsIP(host string) bool
- func IsIPv4(ip string) bool
- func IsIPv6(ip string) bool
- func IsSameIP(ipFirst, ipSecond string) bool
- func Pkcs12Encode(cert, key []byte, password string) (string, error)
- func ReadPrivKey(key []byte) (*rsa.PrivateKey, error)
- func ReadPrivKeyFile(filename string) (*rsa.PrivateKey, error)
- func ReadRootCert(cert []byte) (*x509.Certificate, error)
- func ReadRootCertFile(filename string) (*x509.Certificate, error)
- func WritePEM(filepath string, pem []byte) error
- type CACert
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertificateInfo ¶
func CertificateInfo(certPath string) (*x509.Certificate, error)
func GenerateKey ¶
func GenerateKey(root bool) (*rsa.PrivateKey, error)
func GenerateRoot ¶
func GenerateRoot() (*x509.Certificate, *rsa.PrivateKey, error)
GenerateRoot return cert, privDER, nil
func Pkcs12Encode ¶ added in v1.3.2
func ReadPrivKey ¶
func ReadPrivKey(key []byte) (*rsa.PrivateKey, error)
func ReadPrivKeyFile ¶
func ReadPrivKeyFile(filename string) (*rsa.PrivateKey, error)
func ReadRootCert ¶
func ReadRootCert(cert []byte) (*x509.Certificate, error)
func ReadRootCertFile ¶
func ReadRootCertFile(filename string) (*x509.Certificate, error)
Types ¶
type CACert ¶
type CACert struct { Cert *x509.Certificate Key crypto.PrivateKey }
Click to show internal directories.
Click to hide internal directories.