capistore

package
v5.6.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstallationConfig

type InstallationConfig struct {
	PFX             []byte
	FriendlyName    string
	IsNonExportable bool
	Password        string
	StoreLocation   string
	StoreName       string
}

type PowerShell

type PowerShell struct {
	// contains filtered or unexported fields
}

PowerShell represents the powershell program in Windows. It is used to execute any script on it

func NewPowerShell

func NewPowerShell() *PowerShell

NewPowerShell creates new session

func (PowerShell) InstallCertificateToCAPI

func (ps PowerShell) InstallCertificateToCAPI(config InstallationConfig) error

InstallCertificateToCAPI takes a config object and uses it to install a new certificate in the local machine CAPI store

func (PowerShell) RetrieveCertificateFromCAPI

func (ps PowerShell) RetrieveCertificateFromCAPI(config InstallationConfig) (string, error)

RetrieveCertificateFromCAPI looks for a certificate in the CAPI store config.CertStore that matches the given config.FriendlyName. If found, it returns the certificate in PEM format as a string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL