Versions in this module Expand all Collapse all v11 v11.3.4 Dec 14, 2022 v11.3.3 Dec 13, 2022 Changes in this version + const ECPrivateKeyType + const PKCS1PrivateKeyType + const PKCS8PrivateKeyType + func IsPrivateKeyPolicyError(err error) bool + func LoadX509KeyPair(certFile, keyFile string) (tls.Certificate, error) + func NewPrivateKeyPolicyError(p PrivateKeyPolicy) error + func X509KeyPair(certPEMBlock, keyPEMBlock []byte) (tls.Certificate, error) + type AttestationData struct + PrivateKeyPolicy PrivateKeyPolicy + PublicKeyDER []byte + type AttestationStatement attestation.AttestationStatement + func AttestationStatementFromProto(att *attestation.AttestationStatement) *AttestationStatement + func GetAttestationStatement(priv *PrivateKey) (*AttestationStatement, error) + func (ar *AttestationStatement) MarshalJSON() ([]byte, error) + func (ar *AttestationStatement) ToProto() *attestation.AttestationStatement + func (ar *AttestationStatement) UnmarshalJSON(buf []byte) error + type HardwareSigner interface + GetAttestationStatement func() (*AttestationStatement, error) + GetPrivateKeyPolicy func() PrivateKeyPolicy + type PrivateKey struct + func GetOrGenerateYubiKeyPrivateKey(touchRequired bool) (*PrivateKey, error) + func LoadKeyPair(privFile, sshPubFile string) (*PrivateKey, error) + func LoadPrivateKey(keyFile string) (*PrivateKey, error) + func NewPrivateKey(signer crypto.Signer, keyPEM []byte) (*PrivateKey, error) + func ParseKeyPair(privPEM, marshalledSSHPub []byte) (*PrivateKey, error) + func ParsePrivateKey(keyPEM []byte) (*PrivateKey, error) + func (k *PrivateKey) AsAgentKey(sshCert *ssh.Certificate) (agent.AddedKey, error) + func (k *PrivateKey) MarshalSSHPublicKey() []byte + func (k *PrivateKey) PPKFile() ([]byte, error) + func (k *PrivateKey) PrivateKeyPEM() []byte + func (k *PrivateKey) RSAPrivateKeyPEM() ([]byte, error) + func (k *PrivateKey) SSHPublicKey() ssh.PublicKey + func (k *PrivateKey) TLSCertificate(certPEMBlock []byte) (tls.Certificate, error) + type PrivateKeyPolicy string + const PrivateKeyPolicyHardwareKey + const PrivateKeyPolicyHardwareKeyTouch + const PrivateKeyPolicyNone + func GetPrivateKeyPolicy(priv *PrivateKey) PrivateKeyPolicy + func ParsePrivateKeyPolicyError(err error) (PrivateKeyPolicy, error) + func (p PrivateKeyPolicy) VerifyPolicy(policy PrivateKeyPolicy) error