Import RSA private key from pem file
PHello,
I need help. I'm trying to implement TLS1.3 on my server and I'm stuck importing a 2048-bit RSA private key. I want to import it from a .pem file. I manage to read it, then convert it from base64 to hex (binary) and I have it all in a string.
I use NCryptImportKey and I managed to import the key, in the sense that it doesn't give me an error, then I sign a hash (for the whole handshake), also without error. But when I test with openssl s_client ... it returns an error "bad signature".
Please give me an idea, something to help me. I'm 99% sure that I generated the hash correctly, so it only remains if the key is imported successfully, or the settings for the signing algorithm are ok.
Thank you very much.