-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Net 9 Core > TPM Provider > tlsv1 alert decrypt error:../ssl/record/rec_layer_s3.c:1584:SSL alert number 51 #111251
Comments
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
@krwq Any immediate thoughts spring to mind? |
First validate if encrypt and decrypt work with RSA instance you get from the provider - make sure to use public key directly rather than using provider key for verify/encryption. Now assuming that works fine I have two things which come to my mind:
For a workaround right now you might need to use OpenKeyFromEngine instead which doesn't require separately passing |
I'm wondering if my question about where the OpenSSL default provider is being loaded (ref. #111250) might be relevant here. Looking at the OpenSSL README-PROVIDERS page (https://github.com/openssl/openssl/blob/master/README-PROVIDERS.md), it says
I did some experimenting using the openssl s_server command and found that it would fail if the default provider was not available, either as a -provider default parameter or by being activated in openssl.cnf. |
If I run the openssl server and client commands it communicates to each other.
openssl s_server -provider tpm2 -provider default -propquery '?provider=tpm2' -accept 4567 -key handle:0x81000006 -cert ssl_certificate.pem -cert_chain combinedchain.pem -cipher AES128-GCM-SHA256 -max_protocol TLSv1.2
openssl s_client -connect localhost:4567 -cipher AES128-GCM-SHA256 -debug -msg -min_protocol TLSv1.2 -max_protocol TLSv1.2
But If I implement the Server command into a console application and (client the same as console) It gives error:
Here is the client side error:
Here is the wiereshark screenshot.
This is the code I used to get key from TPM.
Here is the code to set sslOptions:
Here is the example application to reproduce the issue:
https://github.com/serkanturhanxl/TPMHandler
The text was updated successfully, but these errors were encountered: