0

Basically what I want to do is run the MSDN example about SslStream on Mono.

I keep getting the exception: Exception: The authentication or decryption has failed. Inner exception: Server certificate Private Key unavailable.

I assume the code should be fine, and that my problem is certificate/environment related.

I have tried generating self-singed-certificates with both the OpenSsl toolkit and makecert. I have also installed those certificates with certmgr in the Trust strof off both the user and the machine.

I am out of ideas and have no further clue. Anyone? A step-by-step tutorial would be nice, but anything will be appreciated.

Stijn Van Antwerpen
  • 1,840
  • 17
  • 42

1 Answers1

0

Actually I found a solution that was suggested in this answer.

  1. Use the X509Certificate2 class instead of X509Certificate
  2. Embed the private key in the certificate (make a .pfx file)
Community
  • 1
  • 1
Stijn Van Antwerpen
  • 1,840
  • 17
  • 42