tpm2-software / tpm2-openssl

OpenSSL Provider for TPM2 integration
BSD 3-Clause "New" or "Revised" License
88 stars 37 forks source link

Private key reference in tpm #109

Open rogrok opened 7 months ago

rogrok commented 7 months ago

I used the tpm2-openssl https://github.com/tpm2-software/tpm2-openssl/tree/master with openssl to generate a CSR for signing. The below command worked fine

openssl req -new -newkey rsa:2048 -out testcert.csr -subj "/C=US/ST=NJ/L=Test/O=c/OU=etes/CN=testcert" -provider tpm2

I was able to sign the CSR with my private PKI as well. The next step is to reference the private key in tpm and the signed public cert for the Nginx to use as a proxy for TLS. Not sure what the key name for the private key in tpm is as there seems to not an easier way to just list the key names.

MarieCMDM commented 1 month ago

Have you ever resolved that? I'm trying to do the same thing... I was able to male nginx not to rise errors by editing the openssl.cnf file adding tpm2 provider. But i don't really know if it works. I still have some errors of untrusted certificate when trying to access my services ( but maybe i'm doing something wrong when signing the csr or setting nginx for mtsl)