spacemonkeygo / openssl

OpenSSL bindings for Go
http://godoc.org/github.com/spacemonkeygo/openssl
Apache License 2.0
473 stars 236 forks source link

Add signer method for pre-hashed data to allow tls/crypto to use openssl engines #120

Open pipprojects opened 5 years ago

pipprojects commented 5 years ago

I have added a new method cal;led SignPKCS1v15Hash which allows the tls/crypto Signer method to use an openssl engine to sign data. A TPM (Trusted Platform Module) can then be used with Go code, using the library from here

https://git.kernel.org/pub/scm/linux/kernel/git/jejb/openssl_tpm2_engine.git

There is also a function LoadPrivateKeyFromPEMForEngine which loads the engine with the reference to the private key.