I am developing an application in C# that requires to authenticate itself as client (mTLS and TLS 1.3). But the client private key is in HSM and cannot be extracted. Therefore, I need to find way to delegate signing operations to HSM during handshake. Can someone help in finding the right place to Hook custom code?
I find something related but does not provide more detail: How to AuthenticateAsServer when Certificate is in HSM and privateKey is not embeded in Certificate and PrivateKey is not extractable from HSM and Read Certificate from hsm and bind its private key to it and save in X509Store