Versions in this module Expand all Collapse all v0 v0.0.2 May 22, 2023 Changes in this version + var OidAES128CBC = asn1.ObjectIdentifier([]int{ ... }) + var OidAES192CBC = asn1.ObjectIdentifier([]int{ ... }) + var OidAES256CBC = asn1.ObjectIdentifier([]int{ ... }) + var OidDataContentType = asn1.ObjectIdentifier([]int{ ... }) + var OidHmacWithSHA1 = asn1.ObjectIdentifier([]int{ ... }) + var OidHmacWithSHA256 = asn1.ObjectIdentifier([]int{ ... }) + var OidPBEWithSHAAnd128BitRC2CBC = asn1.ObjectIdentifier([]int{ ... }) + var OidPBEWithSHAAnd128BitRC4 = asn1.ObjectIdentifier([]int{ ... }) + var OidPBEWithSHAAnd2KeyTripleDESCBC = asn1.ObjectIdentifier([]int{ ... }) + var OidPBEWithSHAAnd3KeyTripleDESCBC = asn1.ObjectIdentifier([]int{ ... }) + var OidPBEWithSHAAnd40BitRC2CBC = asn1.ObjectIdentifier([]int{ ... }) + var OidPBEWithSHAAnd40BitRC4 = asn1.ObjectIdentifier([]int{ ... }) + var OidSHA1 = asn1.ObjectIdentifier([]int{ ... }) + var OidSHA256 = asn1.ObjectIdentifier([]int{ ... }) + var OidSHA384 = asn1.ObjectIdentifier([]int{ ... }) + var OidSHA512 = asn1.ObjectIdentifier([]int{ ... }) + func DecodeAttribute(attribute *pkcs12Attribute) (key, value string, err error) + func DecodePkcs8ShroudedKeyBagWithPassword(asn1Data []byte, password interface{}) (privateKey interface{}, algorithm asn1.ObjectIdentifier, err error) + func EncodePkcs8ShroudedKeyBagWithPassword(rand io.Reader, privateKey, password interface{}, ...) (asn1Data []byte, err error) + func Marshal(p12 *P12) (pfxData []byte, err error) + func MarshalTrustStore(ts *TrustStore) (pfxData []byte, err error) + func Unmarshal(pfxData []byte, p12 *P12) (err error) + func UnmarshalTrustStore(pfxData []byte, ts *TrustStore) (err error) + type CertEntry struct + Attributes []pkcs12Attribute + Cert *x509.Certificate + FriendlyName string + KeyID []byte + func (d CertEntry) Clone() CertEntry + type KeyEntry struct + Attributes []pkcs12Attribute + FriendlyName string + Key interface{} + KeyID []byte + func (d KeyEntry) Clone() KeyEntry + type P12 struct + CertBagAlgorithm asn1.ObjectIdentifier + CertEntries []CertEntry + CustomKeyDecrypt func(*KeyEntry, []byte) error + CustomKeyEncrypt func(*KeyEntry) ([]byte, error) + HasPassword bool + KeyBagAlgorithm asn1.ObjectIdentifier + KeyEntries []KeyEntry + MACAlgorithm asn1.ObjectIdentifier + Password string + Random io.Reader + SkipDecodeErrors bool + func New() P12 + func NewWithPassword(password string) P12 + type TrustStore struct + CertBagAlgorithm asn1.ObjectIdentifier + Entries []TrustStoreEntry + HasPassword bool + MACAlgorithm asn1.ObjectIdentifier + Password string + Random io.Reader + func NewTrustStoreWithPassword(password string) *TrustStore type TrustStoreEntry + Attributes []pkcs12Attribute + Fingerprint []byte + KeyID []byte v0.0.1 May 19, 2023 Changes in this version + const DefaultPassword + var ErrDecryption = errors.New("pkcs12: decryption error, incorrect padding") + var ErrIncorrectPassword = errors.New("pkcs12: decryption password incorrect") + func Decode(pfxData []byte, password string) (privateKey interface{}, certificate *x509.Certificate, err error) + func DecodeChain(pfxData []byte, password string) (privateKey interface{}, certificate *x509.Certificate, ...) + func DecodeTrustStore(pfxData []byte, password string) (certs []*x509.Certificate, err error) + func Encode(rand io.Reader, privateKey interface{}, certificate *x509.Certificate, ...) (pfxData []byte, err error) + func EncodeTrustStore(rand io.Reader, certs []*x509.Certificate, password string) (pfxData []byte, err error) + func EncodeTrustStoreEntries(rand io.Reader, entries []TrustStoreEntry, password string) (pfxData []byte, err error) + func ToPEM(pfxData []byte, password string) ([]*pem.Block, error) + type NotImplementedError string + func (e NotImplementedError) Error() string + type TrustStoreEntry struct + Cert *x509.Certificate + FriendlyName string