You've already forked linux-packaging-mono
Imported Upstream version 6.0.0.172
Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
parent
8016999e4d
commit
64ac736ec5
@ -50,7 +50,7 @@ namespace Mono.AppleTls
|
||||
SafeSecIdentityHandle serverIdentity;
|
||||
SafeSecIdentityHandle clientIdentity;
|
||||
|
||||
X509Certificate remoteCertificate;
|
||||
X509Certificate2 remoteCertificate;
|
||||
X509Certificate localClientCertificate;
|
||||
MonoTlsConnectionInfo connectionInfo;
|
||||
bool isAuthenticated;
|
||||
@ -247,7 +247,7 @@ namespace Mono.AppleTls
|
||||
|
||||
bool ok;
|
||||
SecTrust trust = null;
|
||||
X509CertificateCollection certificates = null;
|
||||
X509Certificate2Collection certificates = null;
|
||||
|
||||
try {
|
||||
trust = GetPeerTrust (!IsServer);
|
||||
@ -261,18 +261,18 @@ namespace Mono.AppleTls
|
||||
if (trust.Count > 1)
|
||||
Debug ("WARNING: Got multiple certificates in SecTrust!");
|
||||
|
||||
certificates = new X509CertificateCollection ();
|
||||
certificates = new X509Certificate2Collection ();
|
||||
for (int i = 0; i < trust.Count; i++)
|
||||
certificates.Add (trust.GetCertificate (i));
|
||||
|
||||
remoteCertificate = new X509Certificate (certificates [0]);
|
||||
remoteCertificate = new X509Certificate2 (certificates [0]);
|
||||
Debug ("Got peer trust: {0}", remoteCertificate);
|
||||
}
|
||||
|
||||
ok = ValidateCertificate (certificates);
|
||||
} catch (Exception ex) {
|
||||
Debug ("Certificate validation failed: {0}", ex);
|
||||
throw new TlsException (AlertDescription.CertificateUnknown, "Certificate validation threw exception.");
|
||||
throw;
|
||||
} finally {
|
||||
if (trust != null)
|
||||
trust.Dispose ();
|
||||
@ -395,7 +395,7 @@ namespace Mono.AppleTls
|
||||
get { return localClientCertificate; }
|
||||
}
|
||||
|
||||
public override X509Certificate RemoteCertificate {
|
||||
public override X509Certificate2 RemoteCertificate {
|
||||
get { return remoteCertificate; }
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user