...

Package windows

import "github.com/googleapis/enterprise-certificate-proxy/windows"
Overview
Index

Overview ▾

Package windows contains a windows-specific client for accessing the ncrypt APIs directly, bypassing the RPC-mechanism of the universal client.

type SecureKey

SecureKey is a public wrapper for the internal ncrypt implementation.

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

func NewSecureKey

func NewSecureKey(issuer string, store string, provider string) (*SecureKey, error)

NewSecureKey returns a handle to the first available certificate and private key pair in the specified Windows key store matching the filters.

func (*SecureKey) CertificateChain

func (sk *SecureKey) CertificateChain() [][]byte

CertificateChain returns the SecureKey's raw X509 cert chain. This contains the public key.

func (*SecureKey) Close

func (sk *SecureKey) Close()

Close frees up resources associated with the underlying key.

func (*SecureKey) Public

func (sk *SecureKey) Public() crypto.PublicKey

Public returns the public key for this SecureKey.

func (*SecureKey) Sign

func (sk *SecureKey) Sign(_ io.Reader, digest []byte, opts crypto.SignerOpts) (signed []byte, err error)

Sign signs a message digest, using the specified signer options.