diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2009-07-02 11:44:14 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2009-07-02 11:44:14 +0400 |
commit | 3513638089d00b5c8e05cadb05755edebc0870f9 (patch) | |
tree | 2a258806b09e65edcae3853be44fc893a78d4a4a /mcs/class | |
parent | db470fe4d2ca03ea44c0db42ce981ff6cc10eb70 (diff) |
2009-07-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
* X509Certificate2.cs:
* X509Chain.cs: changes to make everything compile with latest changes
and fixed typo in IsChainComplete().
svn path=/trunk/mcs/; revision=137259
Diffstat (limited to 'mcs/class')
3 files changed, 27 insertions, 3 deletions
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog b/mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog index 49a835e0b35..873787dad4c 100644 --- a/mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog +++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog @@ -1,3 +1,9 @@ +2009-07-02 Gonzalo Paniagua Javier <gonzalo@novell.com> + + * X509Certificate2.cs: + * X509Chain.cs: changes to make everything compile with latest changes + and fixed typo in IsChainComplete(). + 2008-06-26 Sebastien Pouliot <sebastien@ximian.com> * X509Certificate2.cs: Allow password-less ctor to (try to) open diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs index f6f58531b3c..ccdfa63ffb7 100644 --- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs +++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs @@ -40,6 +40,12 @@ using MX = Mono.Security.X509; namespace System.Security.Cryptography.X509Certificates { public class X509Certificate2 : X509Certificate { +#if !SECURITY_DEP + // Used in Mono.Security HttpsClientStream + public X509Certificate2 (byte[] rawData) + { + } +#endif #if SECURITY_DEP private bool _archived; private X509ExtensionCollection _extensions; diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs index 26da15b59e6..7fbe42f7bc8 100644 --- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs +++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Chain.cs @@ -353,8 +353,8 @@ namespace System.Security.Cryptography.X509Certificates { private bool IsChainComplete (X509Certificate2 certificate) { // the chain is complete if we have a self-signed certificate - if (!IsSelfIssued (certificate)) - return false; + if (IsSelfIssued (certificate)) + return true; // we're very limited to what we can do without certificate extensions if (certificate.Version < 3) @@ -761,6 +761,9 @@ namespace System.Security.Cryptography.X509Certificates { // FIXME - download and install new CRL // then you get a second chance // crl = FindCrl (ca_cert, ref valid, ref out_of_date); + + // We need to get the subjectAltName and an URI from there (or use OCSP) + // X509KeyUsageExtension subjectAltName = (X509KeyUsageExtension) ca_cert.Extensions["2.5.29.17"]; } if (crl != null) { @@ -854,5 +857,14 @@ namespace System.Security.Cryptography.X509Certificates { } } } - +#elif NET_2_0 && !NET_2_1 +namespace System.Security.Cryptography.X509Certificates { + public class X509Chain { + public bool Build (X509Certificate2 cert) + { + return false; + } + } +} #endif + |