Skip to content

Commit

Permalink
Fix the tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Baulig authored and lewing committed Sep 4, 2019
1 parent 71e34ed commit 29b1ac1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mcs/class/System/Mono.Btls/X509CertificateImplBtls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,14 @@ public override AsymmetricAlgorithm PrivateKey {
set {
if (nativePrivateKey != null)
nativePrivateKey.Dispose ();
if (value == null) {
try {
// FIXME: there doesn't seem to be a public API to check whether it actually
// contains a private key (apart from RSAManaged.PublicOnly).
if (value != null)
nativePrivateKey = MonoBtlsKey.CreateFromRSAPrivateKey ((RSA)value);
} catch {
nativePrivateKey = null;
return;
}
nativePrivateKey = MonoBtlsKey.CreateFromRSAPrivateKey ((RSA)value);
}
}

Expand Down

0 comments on commit 29b1ac1

Please sign in to comment.