Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Certificate ¶
type Certificate struct { // Has the complete certificate with both public and private keys, if both exists Certificates []*x509.Certificate PrivateKeyRaw []byte PrivateKeyRsa *rsa.PrivateKey PrivateKeyEcdsa *ecdsa.PrivateKey PrivateKeyType CertificateKeyType // Indicate if Certificate has private key HasPrivateKey bool // contains filtered or unexported fields }
Certificate handles data on Certificates from Azure Key Vault
func NewCertificateFromDer ¶
func NewCertificateFromDer(der []byte) (*Certificate, error)
NewCertificateFromDer creates a new Certificate from a public cer key
func NewCertificateFromPem ¶
func NewCertificateFromPem(pem string) (*Certificate, error)
NewCertificateFromPem creates a new Certificate from a base64 encoded pem string
func NewCertificateFromPfx ¶
func NewCertificateFromPfx(pfx []byte, ensureServerFirst bool) (*Certificate, error)
NewCertificateFromPfx creates a new Certificate from a PFX certificate
func (*Certificate) ExportPrivateKeyAsPem ¶
func (cert *Certificate) ExportPrivateKeyAsPem() ([]byte, error)
ExportPrivateKeyAsPem returns a pem formatted certificate
func (*Certificate) ExportPublicKeyAsPem ¶
func (cert *Certificate) ExportPublicKeyAsPem() ([]byte, error)
ExportPublicKeyAsPem returns a pem formatted certificate
func (*Certificate) ExportRaw ¶
func (cert *Certificate) ExportRaw() []byte
ExportRaw returns the raw format of the original certificate
type CertificateKeyType ¶
type CertificateKeyType string
CertificateKeyType contains the private key type
const ( // CertificateKeyTypeRsa represents private key type RSA CertificateKeyTypeRsa CertificateKeyType = "rsa" // CertificateKeyTypeEcdsa represents private key type ECDSA CertificateKeyTypeEcdsa = "ecdsa" )
type CertificateOptions ¶
CertificateOptions has options for exporting certificate
type Service ¶
type Service interface { GetSecret(secret *akvs.AzureKeyVault) (string, error) GetKey(secret *akvs.AzureKeyVault) (string, error) GetCertificate(secret *akvs.AzureKeyVault, options *CertificateOptions) (*Certificate, error) }
Service is an interface for implementing vaults
func NewService ¶
func NewService(credentials credentialprovider.AzureKeyVaultCredentials) Service
NewService creates a new AzureKeyVaultService