Unverified Commit e7acdc65 authored by honfika's avatar honfika Committed by GitHub

Merge pull request #604 from justcoding121/honfika-patch-1

Mono fix?
parents f863fdc4 c653a8ef
......@@ -143,8 +143,16 @@ namespace Titanium.Web.Proxy.Network.Certificate
#if NET45
// Set private key onto certificate instance
var x509Certificate = new X509Certificate2(certificate.GetEncoded());
x509Certificate.PrivateKey = DotNetUtilities.ToRSA(rsaparams);
X509Certificate2 x509Certificate;
if (RunTime.IsRunningOnMono)
{
x509Certificate = withPrivateKey(certificate, rsaparams);
}
else
{
x509Certificate = new X509Certificate2(certificate.GetEncoded());
x509Certificate.PrivateKey = DotNetUtilities.ToRSA(rsaparams);
}
#else
var x509Certificate = withPrivateKey(certificate, rsaparams);
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment