Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Pouliot <sebastien@ximian.com>2007-05-09 19:19:20 +0400
committerSebastien Pouliot <sebastien@ximian.com>2007-05-09 19:19:20 +0400
commit2ee91ed03fef19973eb6cdce1c86cbfcdcfd2623 (patch)
tree1ab55fda986934a5a352fb4c0508c0f0382db0d0 /mcs/class/System/System.Security.Cryptography.X509Certificates
parent8d447ba9448095a61092a492bfba412bf5d6db48 (diff)
2007-05-09 Sebastien Pouliot <sebastien@ximian.com>
* X509Certificate2.cs: Leave a small stub (PrivateKey property) if SECURITY_DEP isn't defined. This will let Mono.Security.dll build correctly under 2.0 while enabling the use of X509Certificate2 to add support for X.509 client certificates in SSL/TLS. svn path=/trunk/mcs/; revision=77028
Diffstat (limited to 'mcs/class/System/System.Security.Cryptography.X509Certificates')
-rw-r--r--mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog7
-rw-r--r--mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs13
2 files changed, 17 insertions, 3 deletions
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog b/mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog
index 3f9b05e5c38..f7d7b6673a5 100644
--- a/mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog
+++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog
@@ -1,3 +1,10 @@
+2007-05-09 Sebastien Pouliot <sebastien@ximian.com>
+
+ * X509Certificate2.cs: Leave a small stub (PrivateKey property) if
+ SECURITY_DEP isn't defined. This will let Mono.Security.dll build
+ correctly under 2.0 while enabling the use of X509Certificate2 to add
+ support for X.509 client certificates in SSL/TLS.
+
2006-12-07 Sebastien Pouliot <sebastien@ximian.com>
* X500DistinguishedName.cs: Add an internal method to compare
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs
index 9f63de87287..2078ec09d4c 100644
--- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs
+++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && SECURITY_DEP
+#if NET_2_0
using System.IO;
using System.Text;
@@ -38,7 +38,7 @@ using MX = Mono.Security.X509;
namespace System.Security.Cryptography.X509Certificates {
public class X509Certificate2 : X509Certificate {
-
+#if SECURITY_DEP
private bool _archived;
private X509ExtensionCollection _extensions;
private string _name = String.Empty;
@@ -639,7 +639,14 @@ namespace System.Security.Cryptography.X509Certificates {
internal MX.X509Certificate MonoCertificate {
get { return _cert; }
}
+
+#else
+ // HACK - this ensure the type X509Certificate2 and PrivateKey property exists in the build before
+ // Mono.Security.dll is built. This is required to get working client certificate in SSL/TLS
+ public AsymmetricAlgorithm PrivateKey {
+ get { return null; }
+ }
+#endif
}
}
-
#endif