Documentation
¶
Index ¶
- Variables
- func LoadPfxFromFile(name, password string) (*rsa.PrivateKey, *x509.Certificate, error)
- func LoadRSAPKCS1PrivateKeyFromPEMFile(name string) (*rsa.PrivateKey, error)
- func LoadRSAPKCS8PrivateKeyFromPEMFile(name string) (*rsa.PrivateKey, error)
- func LoadRSAPrivateKeyFromFile(name string) (*rsa.PrivateKey, error)
- func LoadRSAPrivateKeyFromPEMFile(name string) (*rsa.PrivateKey, error)
- func LoadRSAPublicKeyFromFile(name string) (*rsa.PublicKey, error)
- func LoadRSAPublicKeyFromPEMFile(name string) (*rsa.PublicKey, error)
- func ParseCertificate(key []byte) (*x509.Certificate, error)
- func ParseCertificateFromPEM(key []byte) (*x509.Certificate, error)
- func ParsePfx(pfxData []byte, password string) (*rsa.PrivateKey, *x509.Certificate, error)
- func ParseRSAPKCS1PrivateKeyFromPEM(key []byte, password ...string) (*rsa.PrivateKey, error)
- func ParseRSAPKCS8PrivateKeyFromPEM(key []byte, password ...string) (*rsa.PrivateKey, error)
- func ParseRSAPrivateKey(key []byte, password ...string) (*rsa.PrivateKey, error)
- func ParseRSAPrivateKeyFromPEM(key []byte, password ...string) (*rsa.PrivateKey, error)
- func ParseRSAPublicKey(key []byte, password ...string) (*rsa.PublicKey, error)
- func ParseRSAPublicKeyFromPEM(key []byte, password ...string) (*rsa.PublicKey, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotPEMEncodedKey = errors.New("cert4go: key must be PEM encoded PKCS1 or PKCS8 private key") ErrNotRSAPrivateKey = errors.New("cert4go: key is not a valid RSA private key") ErrNotRSAPublicKey = errors.New("cert4go: key is not a valid RSA public key") ErrNotCertificate = errors.New("cert4go: key is not a valid certificate") ErrNotRSAPfxData = errors.New("cert4go: pfx data not a valid data") )
Functions ¶
func LoadPfxFromFile ¶
func LoadPfxFromFile(name, password string) (*rsa.PrivateKey, *x509.Certificate, error)
func LoadRSAPKCS1PrivateKeyFromPEMFile ¶
func LoadRSAPKCS1PrivateKeyFromPEMFile(name string) (*rsa.PrivateKey, error)
func LoadRSAPKCS8PrivateKeyFromPEMFile ¶
func LoadRSAPKCS8PrivateKeyFromPEMFile(name string) (*rsa.PrivateKey, error)
func LoadRSAPrivateKeyFromFile ¶
func LoadRSAPrivateKeyFromFile(name string) (*rsa.PrivateKey, error)
func LoadRSAPrivateKeyFromPEMFile ¶
func LoadRSAPrivateKeyFromPEMFile(name string) (*rsa.PrivateKey, error)
func ParseCertificate ¶
func ParseCertificate(key []byte) (*x509.Certificate, error)
func ParseCertificateFromPEM ¶
func ParseCertificateFromPEM(key []byte) (*x509.Certificate, error)
func ParsePfx ¶
func ParsePfx(pfxData []byte, password string) (*rsa.PrivateKey, *x509.Certificate, error)
func ParseRSAPKCS1PrivateKeyFromPEM ¶
func ParseRSAPKCS1PrivateKeyFromPEM(key []byte, password ...string) (*rsa.PrivateKey, error)
ParseRSAPKCS1PrivateKeyFromPEM PEM encoded PKCS1 private key if password exist,PEM encoded PKCS1 private key protected with password, it will decode with password
func ParseRSAPKCS8PrivateKeyFromPEM ¶
func ParseRSAPKCS8PrivateKeyFromPEM(key []byte, password ...string) (*rsa.PrivateKey, error)
ParseRSAPKCS8PrivateKeyFromPEM PEM encoded PKCS8 private key if password exist,PEM encoded PKCS8 private key protected with password, it will decode with password
func ParseRSAPrivateKey ¶
func ParseRSAPrivateKey(key []byte, password ...string) (*rsa.PrivateKey, error)
ParseRSAPrivateKey parse public key
- Pem format PKCS1 or PKCS8 public key if password exist,PEM encoded PKCS1 or PKCS8 private key protected with password, it will decode with password
- PKIX, ASN.1 DER form public key
func ParseRSAPrivateKeyFromPEM ¶
func ParseRSAPrivateKeyFromPEM(key []byte, password ...string) (*rsa.PrivateKey, error)
ParseRSAPrivateKeyFromPEM PEM encoded PKCS1 or PKCS8 private key if password exist,PEM encoded PKCS1 or PKCS8 private key protected with password, it will decode with password
func ParseRSAPublicKey ¶
ParseRSAPublicKey parse public key - Pem format PKCS1 or PKCS8 public key - PKIX, ASN.1 DER form public key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.