Documentation ¶
Index ¶
- Constants
- func New(certType string, configJSON json.RawMessage) (module certhandler.CertModule, err error)
- type PKCS11Module
- func (module *PKCS11Module) ApplyCertificate(x509Certs []*x509.Certificate) (certInfo certhandler.CertInfo, password string, err error)
- func (module *PKCS11Module) Clear() error
- func (module *PKCS11Module) Close() (err error)
- func (module *PKCS11Module) CreateKey(password, algorithm string) (key crypto.PrivateKey, err error)
- func (module *PKCS11Module) RemoveCertificate(certURL, password string) error
- func (module *PKCS11Module) RemoveKey(keyURL, password string) error
- func (module *PKCS11Module) SetOwner(password string) (err error)
- func (module *PKCS11Module) ValidateCertificates() (validInfos []certhandler.CertInfo, invalidCerts, invalidKeys []string, ...)
Constants ¶
View Source
const ( CKS_RO_PUBLIC_SESSION = iota CKS_RO_USER_FUNCTIONS CKS_RW_PUBLIC_SESSION CKS_RW_USER_FUNCTIONS CKS_RW_SO_FUNCTIONS )
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(certType string, configJSON json.RawMessage) (module certhandler.CertModule, err error)
New creates pkcs11 module instance.
Types ¶
type PKCS11Module ¶
PKCS11Module PKCS11 certificate module.
func (*PKCS11Module) ApplyCertificate ¶
func (module *PKCS11Module) ApplyCertificate(x509Certs []*x509.Certificate) ( certInfo certhandler.CertInfo, password string, err error, )
ApplyCertificate applies certificate.
func (*PKCS11Module) Clear ¶
func (module *PKCS11Module) Clear() error
Clear clears security storage.
func (*PKCS11Module) Close ¶
func (module *PKCS11Module) Close() (err error)
Close closes PKCS11 module.
func (*PKCS11Module) CreateKey ¶
func (module *PKCS11Module) CreateKey(password, algorithm string) (key crypto.PrivateKey, err error)
CreateKey creates key pair.
func (*PKCS11Module) RemoveCertificate ¶
func (module *PKCS11Module) RemoveCertificate(certURL, password string) error
RemoveCertificate removes certificate.
func (*PKCS11Module) RemoveKey ¶
func (module *PKCS11Module) RemoveKey(keyURL, password string) error
RemoveKey removes key.
func (*PKCS11Module) SetOwner ¶
func (module *PKCS11Module) SetOwner(password string) (err error)
SetOwner owns slot.
func (*PKCS11Module) ValidateCertificates ¶
func (module *PKCS11Module) ValidateCertificates() ( validInfos []certhandler.CertInfo, invalidCerts, invalidKeys []string, err error, )
ValidateCertificates returns list of valid pairs, invalid certificates and invalid keys.
Click to show internal directories.
Click to hide internal directories.