Author: atsushi
Date: 2007-08-24 08:31:11 -0400 (Fri, 24 Aug 2007)
New Revision: 84803
Modified:
trunk/mcs/class/System/System.Net.Security/ChangeLog
trunk/mcs/class/System/System.Net.Security/SslStream.cs
Log:
2007-08-24 Atsushi Enomoto <[EMAIL PROTECTED]>
* SslStream.cs : uh, fixed the build.
Modified: trunk/mcs/class/System/System.Net.Security/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Net.Security/ChangeLog 2007-08-24
12:07:37 UTC (rev 84802)
+++ trunk/mcs/class/System/System.Net.Security/ChangeLog 2007-08-24
12:31:11 UTC (rev 84803)
@@ -1,5 +1,9 @@
2007-08-24 Atsushi Enomoto <[EMAIL PROTECTED]>
+ * SslStream.cs : uh, fixed the build.
+
+2007-08-24 Atsushi Enomoto <[EMAIL PROTECTED]>
+
* SslStream.cs : implemented, based on Mono.Security.
* LocalCertificateSelectionCallback.cs : extern alias is needed.
Modified: trunk/mcs/class/System/System.Net.Security/SslStream.cs
===================================================================
--- trunk/mcs/class/System/System.Net.Security/SslStream.cs 2007-08-24
12:07:37 UTC (rev 84802)
+++ trunk/mcs/class/System/System.Net.Security/SslStream.cs 2007-08-24
12:31:11 UTC (rev 84803)
@@ -348,8 +348,11 @@
if (validation_callback != null)
s.ServerCertValidationDelegate = delegate
(X509Certificate cert, int [] certErrors) {
- X509Chain chain = new X509Chain ();
- chain.Build (cert);
+ X509Chain chain = null;
+ if (cert is X509Certificate2) {
+ chain = new X509Chain ();
+ chain.Build ((X509Certificate2)
cert);
+ }
// FIXME: SslPolicyErrors is incomplete
SslPolicyErrors errors =
certErrors.Length > 0 ? SslPolicyErrors.RemoteCertificateChainErrors :
SslPolicyErrors.None;
return validation_callback (this, cert,
chain, errors);
@@ -394,8 +397,11 @@
if (validation_callback != null)
s.ClientCertValidationDelegate = delegate
(X509Certificate cert, int [] certErrors) {
- X509Chain chain = new X509Chain ();
- chain.Build (cert);
+ X509Chain chain = null;
+ if (cert is X509Certificate2) {
+ chain = new X509Chain ();
+ chain.Build ((X509Certificate2)
cert);
+ }
// FIXME: SslPolicyErrors is incomplete
SslPolicyErrors errors =
certErrors.Length > 0 ? SslPolicyErrors.RemoteCertificateChainErrors :
SslPolicyErrors.None;
return validation_callback (this, cert,
chain, errors);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches