Versions in this module Expand all Collapse all v0 v0.1.1 Mar 18, 2019 v0.1.0 Mar 7, 2019 Changes in this version + func CertToPEM(der []byte) []byte + func DeleteKey(dev io.ReadWriteCloser, handle tpmutil.Handle, password string) error + func GenRSAPrimaryKey(dev io.ReadWriteCloser, handle tpmutil.Handle, parentPW, ownerPW string, ...) (crypto.PublicKey, error) + func GetHandles(dev io.ReadWriteCloser, start tpm2.TPMProp) ([]tpmutil.Handle, error) + func KeyList(dev io.ReadWriteCloser) ([]tpmutil.Handle, error) + func LoadExternal(dev io.ReadWriteCloser, handle tpmutil.Handle, pk crypto.PrivateKey, ...) (tpmutil.Handle, error) + func LoadKeyPair(crtFilePEM, keyFilePEM string) (*x509.Certificate, crypto.PrivateKey, error) + func LoadRSAKeyFile(keyFilePEM string) (crypto.PrivateKey, error) + func LoadX509CertificateFile(crtFilePEM string) (*x509.Certificate, error) + func MarshalSSHPublic(k ssh.PublicKey, id string) []byte + func NVDelete(dev io.ReadWriteCloser, index tpmutil.Handle, password string) error + func NVList(dev io.ReadWriteCloser) ([]tpmutil.Handle, error) + func NVRead(dev io.ReadWriteCloser, index tpmutil.Handle, password string) ([]byte, error) + func NVWrite(dev io.ReadWriteCloser, index tpmutil.Handle, b []byte, password string, ...) error + func OpenDevice(device string) (io.ReadWriteCloser, error) + func PEMToPrivKey(b []byte) (crypto.PrivateKey, error) + func PEMToPubKey(b []byte) (crypto.PublicKey, error) + func PubKeyToPEM(pub crypto.PublicKey) ([]byte, error) + func ReadPublicKey(dev io.ReadWriteCloser, handle tpmutil.Handle) (tpm2.Public, crypto.PublicKey, error) + type RSAPrivateKey struct + func NewRSAPrivateKey(dev io.ReadWriteCloser, handle tpmutil.Handle, password string) (RSAPrivateKey, error) + func (k RSAPrivateKey) Decrypt(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) ([]byte, error) + func (k RSAPrivateKey) Public() crypto.PublicKey + func (k RSAPrivateKey) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error) + type Simulator struct + func OpenSim() (Simulator, error) + func (s Simulator) Close() error