Versions in this module Expand all Collapse all v1 v1.0.8 Sep 1, 2026 v1.0.7 Aug 31, 2026 Changes in this version + const BackupDomainController — windows/amd64 + const CertStoreOpenMaximumAllowed — windows/amd64 + const CertStoreReadOnly — windows/amd64 + const CertStoreSaveToFile — windows/amd64 + const MemberServer — windows/amd64 + const MemberWorkstation — windows/amd64 + const NCryptPadOAEPFlag — windows/amd64 + const PrimaryDomainController — windows/amd64 + const ProviderMSLegacy — windows/amd64 + const ProviderMSPlatform — windows/amd64 + const ProviderMSSoftware — windows/amd64 + const StandaloneServer — windows/amd64 + const StandaloneWorkstation — windows/amd64 + var ErrNoNetworkAdapter = errors.New("network adapter not detected") — windows/amd64 + func FreeCertContext(ctx *windows.CertContext) error — windows/amd64 + func NetInfo() ([]string, error) — windows/amd64 + func PEMToX509(b []byte) (*x509.Certificate, error) + func RemoveCertByContext(certContext *windows.CertContext) error — windows/amd64 + func User() (string, error) — windows/amd64 + func UserSID() (string, error) — windows/amd64 + func ValidateGenerateOpts(opts GenerateOpts) error + type Algorithm string + const EC + const RSA + func (a Algorithm) Tox509() x509.PublicKeyAlgorithm + type CertResult struct — windows/amd64 + Certificate *x509.Certificate + Chain []*x509.Certificate + KeyStatus *KeyStatus + type CertStorage interface + Cert func() (*x509.Certificate, error) + CertificateChain func() ([][]*x509.Certificate, error) + Generate func(opts GenerateOpts) (crypto.Signer, error) + Intermediate func() (*x509.Certificate, error) + Key func() (Credential, error) + Store func(cert *x509.Certificate, intermediate *x509.Certificate) error + type Credential interface + Decrypt func(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error) + Public func() crypto.PublicKey + Sign func(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error) + type DecrypterOpts struct — windows/amd64 + Flags uint32 + Hashfunc crypto.Hash + type FileStorage struct + func NewFileStorage(basepath string) *FileStorage + func (f *FileStorage) Generate(opts GenerateOpts) (crypto.Signer, error) + func (f *FileStorage) Store(cert *x509.Certificate, intermediate *x509.Certificate) error + func (f FileStorage) Cert() (*x509.Certificate, error) + func (f FileStorage) CertificateChain() ([][]*x509.Certificate, error) + func (f FileStorage) Decrypt(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) ([]byte, error) + func (f FileStorage) Intermediate() (*x509.Certificate, error) + func (f FileStorage) Key() (Credential, error) + func (f FileStorage) Public() crypto.PublicKey + func (f FileStorage) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) + type GenerateOpts struct + Algorithm Algorithm + Size int + type Key struct — windows/amd64 + AlgorithmGroup string + Container string + LegacyContainer string + func (k *Key) SetACL(access string, sid string, perm string) error + func (k Key) Decrypt(rand io.Reader, blob []byte, opts crypto.DecrypterOpts) ([]byte, error) + func (k Key) Public() crypto.PublicKey + func (k Key) Sign(_ io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) + func (k Key) TransientTpmHandle() uintptr + type KeyStatus struct — windows/amd64 + Container string + IsExportable bool + IsHardware bool + Signer crypto.Signer + type Store struct — windows/amd64 + func OpenStore(ctx StoreContext, storeName string, opts StoreOpenOptions) (*Store, error) + func (s *Store) Close() error + func (s *Store) DeleteCertByThumbprint(thumbprint string) error + func (s *Store) FindCertByCommonName(cn string) (*CertResult, error) + func (s *Store) FindCertByThumbprint(thumbprint string) (*CertResult, error) + func (s *Store) GenerateKey(opts GenerateOpts) (crypto.Signer, error) + func (s *Store) ImportCertAndKey(cert *x509.Certificate, chain []*x509.Certificate, key crypto.PrivateKey) error + func (s *Store) RenewCert(cn string, newCert *x509.Certificate, newChain []*x509.Certificate) error + func (s *Store) StoreCertWithChain(cert *x509.Certificate, chain []*x509.Certificate) error + type StoreContext int — windows/amd64 + const MachineStore + const UserStore + type StoreOpenOptions struct — windows/amd64 + Container string + LegacyKey bool + Provider string + ReadOnly bool + type Win32_ComputerSystem struct — windows/amd64 + DNSHostName string + Domain string + DomainRole int + Model string + func CompInfo() (*Win32_ComputerSystem, error) + type Win32_ComputerSystemProduct struct — windows/amd64 + IdentifyingNumber string + UUID string + Vendor string + func CompProdInfo() (*Win32_ComputerSystemProduct, error) + type Win32_NetworkAdapter struct — windows/amd64 + MACAddress string + type WinCertStorage interface — windows/amd64 + CertKey func(cert *windows.CertContext) (*Key, error) + CertWithContext func() (*x509.Certificate, *windows.CertContext, error) + Close func() error + Link func() error + Remove func(removeSystem bool) error + StoreWithDisposition func(cert *x509.Certificate, intermediate *x509.Certificate, disposition uint32) error + type WinCertStore struct — windows/amd64 + Prov uintptr + ProvName string + func OpenWinCertStore(provider, container string, issuers, intermediateIssuers []string, ...) (*WinCertStore, error) + func OpenWinCertStoreCurrentUser(provider, container string, issuers, intermediateIssuers []string, ...) (*WinCertStore, error) + func OpenWinCertStoreWithOptions(opts WinCertStoreOptions) (*WinCertStore, error) + func (w *WinCertStore) Cert() (*x509.Certificate, error) + func (w *WinCertStore) CertByCommonName(commonName string) (*x509.Certificate, *windows.CertContext, [][]*x509.Certificate, error) + func (w *WinCertStore) CertKey(cert *windows.CertContext) (*Key, error) + func (w *WinCertStore) CertWithContext() (*x509.Certificate, *windows.CertContext, error) + func (w *WinCertStore) CertificateChain() ([][]*x509.Certificate, error) + func (w *WinCertStore) Close() error + func (w *WinCertStore) Generate(opts GenerateOpts) (crypto.Signer, error) + func (w *WinCertStore) Intermediate() (*x509.Certificate, error) + func (w *WinCertStore) Key() (Credential, error) + func (w *WinCertStore) Link() error + func (w *WinCertStore) Remove(removeSystem bool) error + func (w *WinCertStore) Root(issuer []string) (*x509.Certificate, error) + func (w *WinCertStore) Store(cert *x509.Certificate, intermediate *x509.Certificate) error + func (w *WinCertStore) StoreWithDisposition(cert *x509.Certificate, intermediate *x509.Certificate, disposition uint32) error + type WinCertStoreOptions struct — windows/amd64 + Container string + CurrentUser bool + IntermediateIssuers []string + Issuers []string + LegacyKey bool + Provider string + StoreFlags uint32 + func DefaultWinCertStoreOptions(provider, container string, issuers, intermediateIssuers []string, ...) WinCertStoreOptions