vcertutil

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: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultRSALength represents the default length of an RSA Private Key
	DefaultRSALength = 2048

	// DefaultTimeout represents the default time in seconds vcert will try to retrieve a certificate
	DefaultTimeout = 180

	// OriginName represents the Origin of the Request set in a Custom Field
	OriginName = "Venafi VCert Playbook"
)

Variables

This section is empty.

Functions

func DecryptPrivateKey

func DecryptPrivateKey(privateKey string, password string) (string, error)

DecryptPrivateKey takes an encrypted private key and decrypts it using the given password.

The private key must be in PKCS8 format.

func EncryptPrivateKeyPKCS1

func EncryptPrivateKeyPKCS1(privateKey string, password string) (string, error)

EncryptPrivateKeyPKCS1 takes a decrypted PKCS8 private key and encrypts it back in PKCS1 format

func EnrollCertificate

func EnrollCertificate(config domain.Config, request domain.PlaybookRequest) (*certificate.PEMCollection, *certificate.Request, error)

EnrollCertificate takes a Request object and requests a certificate to the Venafi platform defined by config.

Then it retrieves the certificate and returns it along with the certificate chain and the private key used.

func GeneratePassword added in v5.1.1

func GeneratePassword() string

func IsValidAccessToken

func IsValidAccessToken(config domain.Config) (bool, error)

IsValidAccessToken checks that the accessToken in config is not expired.

func RefreshTPPTokens

func RefreshTPPTokens(config domain.Config) (string, string, error)

RefreshTPPTokens uses the refreshToken in config to request a new pair of tokens

Types

This section is empty.

Jump to

Keyboard shortcuts

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