How can I convert a private key file from Java into .net x509Certificate2
I am writing a .NET client app that consumes a Java web service and need to sign sent requests (related to this other question ). I have been supplied with a private.key file (and a .X509 certificate) and a Java source example. The certificate looks like the public key of service, and the private.key is what I use to sign requests. In the Java source, I can see they convert the file to a byte array and pass it into the constructor of the PKCS8EncodedKeySpec class. A bit of googling suggests this file is a private key hash (though I may be wrong). Is there any way to use this in .Net or convert