2005-04-23 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Sat, 23 Apr 2005 14:09:12 +0000 (14:09 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Sat, 23 Apr 2005 14:09:12 +0000 (14:09 -0000)
* X509CertificateEx.cs, X509CertificateExCollection.cs,
X509CertificateExEnumerator.cs, X509Chain.cs, X509ChainElement.cs,
X509ChainPolicy.cs, X509Store.cs: Changed all references of
X509CertificateEx to X509Certificate2 to match beta2.

svn path=/trunk/mcs/; revision=43480

mcs/class/System.Security/System.Security.Cryptography.X509Certificates/ChangeLog
mcs/class/System.Security/System.Security.Cryptography.X509Certificates/X509CertificateEx.cs
mcs/class/System.Security/System.Security.Cryptography.X509Certificates/X509CertificateExCollection.cs
mcs/class/System.Security/System.Security.Cryptography.X509Certificates/X509CertificateExEnumerator.cs
mcs/class/System.Security/System.Security.Cryptography.X509Certificates/X509Chain.cs
mcs/class/System.Security/System.Security.Cryptography.X509Certificates/X509ChainElement.cs
mcs/class/System.Security/System.Security.Cryptography.X509Certificates/X509ChainPolicy.cs
mcs/class/System.Security/System.Security.Cryptography.X509Certificates/X509Store.cs

index ce4684c43f2f814351e1a408e8874d18f2d9cb25..70bc7f31ad59131c70d0eea7138b5f269e3d5044 100755 (executable)
@@ -1,3 +1,10 @@
+2005-04-23  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * X509CertificateEx.cs, X509CertificateExCollection.cs, 
+       X509CertificateExEnumerator.cs, X509Chain.cs, X509ChainElement.cs,
+       X509ChainPolicy.cs, X509Store.cs: Changed all references of
+       X509CertificateEx to X509Certificate2 to match beta2.
+
 2005-01-17  Sebastien Pouliot  <sebastien@ximian.com>
 
        * X509BasicConstraintsExtension.cs: Completed implementation.
index ef187262682ec6665067711238c4059b02d86216..34074f02346d4e456d797a48f78d6e0f06a92379 100755 (executable)
@@ -1,11 +1,11 @@
 //
-// X509CertificateEx.cs - System.Security.Cryptography.X509CertificateEx
+// System.Security.Cryptography.X509Certificate2 class
 //
 // Author:
 //     Sebastien Pouliot  <sebastien@ximian.com>
 //
 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// Copyright (C) 2004 Novell Inc. (http://www.novell.com)
+// Copyright (C) 2004-2005 Novell Inc. (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -36,7 +36,7 @@ using MX = Mono.Security.X509;
 
 namespace System.Security.Cryptography.X509Certificates {
 
-       public class X509CertificateEx : X509Certificate {
+       public class X509Certificate2 : X509Certificate {
 
                private bool _archived;
                private X509ExtensionCollection _extensions;
@@ -48,49 +48,49 @@ namespace System.Security.Cryptography.X509Certificates {
 
                // constructors
 
-               public X509CertificateEx () : base () 
+               public X509Certificate2 () : base () 
                {
                        _cert = new MX.X509Certificate (this.RawData);
                }
 
-               public X509CertificateEx (byte[] rawData) : base (rawData) 
+               public X509Certificate2 (byte[] rawData) : base (rawData) 
                {
                        _cert = new MX.X509Certificate (this.RawData);
                }
 
-               public X509CertificateEx (byte[] rawData, string password) : base (rawData, password) 
+               public X509Certificate2 (byte[] rawData, string password) : base (rawData, password) 
                {
                        _cert = new MX.X509Certificate (this.RawData);
                }
 
-               public X509CertificateEx (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags)
+               public X509Certificate2 (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags)
                        : base (rawData, password, keyStorageFlags) 
                {
                        _cert = new MX.X509Certificate (this.RawData);
                }
 
-               public X509CertificateEx (string fileName) : base (fileName) 
+               public X509Certificate2 (string fileName) : base (fileName) 
                {
                        _cert = new MX.X509Certificate (this.RawData);
                }
 
-               public X509CertificateEx (string fileName, string password) 
+               public X509Certificate2 (string fileName, string password) 
                {
                        _cert = new MX.X509Certificate (this.RawData);
                }
 
-               public X509CertificateEx (string fileName, string password, X509KeyStorageFlags keyStorageFlags)
+               public X509Certificate2 (string fileName, string password, X509KeyStorageFlags keyStorageFlags)
                        : base (fileName, password, keyStorageFlags) 
                {
                        _cert = new MX.X509Certificate (this.RawData);
                }
 
-               public X509CertificateEx (IntPtr handle) : base (handle) 
+               public X509Certificate2 (IntPtr handle) : base (handle) 
                {
                        _cert = new MX.X509Certificate (this.RawData);
                }
 
-               public X509CertificateEx (X509CertificateEx certificate) 
+               public X509Certificate2 (X509Certificate2 certificate) 
                {
                        _cert = new MX.X509Certificate (this.RawData);
                }
index 1b29bf9090111513d744864a1a39ce1e32bce08b..9b8fdd58f0d3d2d6861aa667d2a0824ac0e1587b 100755 (executable)
@@ -1,14 +1,13 @@
 //
-// X509CertificateExCollection.cs - System.Security.Cryptography.X509Certificates.X509CertificateExCollection
+// System.Security.Cryptography.X509Certificates.X509Certificate2Collection class
 //
-// Author:
-//     Sebastien Pouliot (spouliot@motus.com)
+// Authors:
+//     Sebastien Pouliot  <sebastien@ximian.com>
 //     Tim Coleman (tim@timcoleman.com)
 //
 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
 // Copyright (C) Tim Coleman, 2004
-//
-
+// Copyright (C) 2005 Novell Inc. (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 
 #if NET_2_0
 
-using System;
 using System.Collections;
 
 namespace System.Security.Cryptography.X509Certificates {
 
-       // Note: Match the definition of framework version 1.2.3400.0 on http://longhorn.msdn.microsoft.com
-
-       public sealed class X509CertificateExCollection : X509CertificateCollection {
+       public sealed class X509Certificate2Collection : X509CertificateCollection {
 
                // constructors
 
-               public X509CertificateExCollection () {}
+               public X509Certificate2Collection ()
+               {
+               }
 
-               public X509CertificateExCollection (X509CertificateExCollection certificates)
+               public X509Certificate2Collection (X509Certificate2Collection certificates)
                {
                        AddRange (certificates);
                }
 
-               public X509CertificateExCollection (X509CertificateEx[] certificates) 
+               public X509Certificate2Collection (X509Certificate2[] certificates) 
                {
                        AddRange (certificates);
                }
 
                // properties
 
-               public new X509CertificateEx this [int index] {
+               public new X509Certificate2 this [int index] {
                        get {
                                if (index < 0)
                                        throw new ArgumentOutOfRangeException ("negative index");
                                if (index >= InnerList.Count)
                                        throw new ArgumentOutOfRangeException ("index >= Count");
-                               return (X509CertificateEx) InnerList [index];
+                               return (X509Certificate2) InnerList [index];
                        }
                        set { InnerList [index] = value; }
                }
 
                // methods
 
-               public int Add (X509CertificateEx certificate)
+               public int Add (X509Certificate2 certificate)
                {
                        if (certificate == null)
                                throw new ArgumentNullException ("certificate");
@@ -79,7 +77,7 @@ namespace System.Security.Cryptography.X509Certificates {
                }
 
                // note: transactional
-               public void AddRange (X509CertificateEx[] certificates) 
+               public void AddRange (X509Certificate2[] certificates) 
                {
                        if (certificates == null)
                                throw new ArgumentNullException ("certificates");
@@ -89,7 +87,7 @@ namespace System.Security.Cryptography.X509Certificates {
                }
 
                // note: transactional
-               public void AddRange (X509CertificateExCollection certificates) 
+               public void AddRange (X509Certificate2Collection certificates) 
                {
                        if (certificates == null)
                                throw new ArgumentNullException ("certificates");
@@ -97,12 +95,12 @@ namespace System.Security.Cryptography.X509Certificates {
                        InnerList.AddRange (certificates);
                }
 
-               public bool Contains (X509CertificateEx certificate) 
+               public bool Contains (X509Certificate2 certificate) 
                {
                        if (certificate == null)
                                throw new ArgumentNullException ("certificate");
 
-                       foreach (X509CertificateEx c in InnerList) {
+                       foreach (X509Certificate2 c in InnerList) {
                                if (certificate.Equals (c))
                                        return true;
                        }
@@ -119,12 +117,12 @@ namespace System.Security.Cryptography.X509Certificates {
                        return null;
                }
 
-               public X509CertificateExCollection Find (X509FindType findType, object findValue, bool validOnly) 
+               public X509Certificate2Collection Find (X509FindType findType, object findValue, bool validOnly) 
                {
                        return null;
                }
 
-               public new X509CertificateExEnumerator GetEnumerator () 
+               public new X509Certificate2Enumerator GetEnumerator () 
                {
                        return null;
                }
@@ -145,7 +143,7 @@ namespace System.Security.Cryptography.X509Certificates {
                {
                }
 
-               public void Insert (int index, X509CertificateEx certificate) 
+               public void Insert (int index, X509Certificate2 certificate) 
                {
                        if (certificate == null)
                                throw new ArgumentNullException ("certificate");
@@ -157,13 +155,13 @@ namespace System.Security.Cryptography.X509Certificates {
                        InnerList.Insert (index, certificate);
                }
 
-               public void Remove (X509CertificateEx certificate) 
+               public void Remove (X509Certificate2 certificate) 
                {
                        if (certificate == null)
                                throw new ArgumentNullException ("certificate");
 
                        for (int i=0; i < InnerList.Count; i++) {
-                               X509CertificateEx c = (X509CertificateEx) InnerList [i];
+                               X509Certificate2 c = (X509Certificate2) InnerList [i];
                                if (certificate.Equals (c)) {
                                        InnerList.RemoveAt (i);
                                        // only first instance is removed
@@ -173,27 +171,27 @@ namespace System.Security.Cryptography.X509Certificates {
                }
 
                // note: transactional
-               public void RemoveRange (X509CertificateEx[] certificates)
+               public void RemoveRange (X509Certificate2[] certificates)
                {
                        if (certificates == null)
                                throw new ArgumentNullException ("certificate");
                }
 
                // note: transactional
-               public void RemoveRange (X509CertificateExCollection certificates) 
+               public void RemoveRange (X509Certificate2Collection certificates) 
                {
                        if (certificates == null)
                                throw new ArgumentNullException ("certificate");
                }
 
                // note: UI
-               public X509CertificateExCollection Select (string title, string message, X509SelectionFlag selectionFlag)
+               public X509Certificate2Collection Select (string title, string message, X509SelectionFlag selectionFlag)
                {
                        return null;
                }
 
                // note: UI
-               public X509CertificateExCollection Select (string title, string message, X509SelectionFlag selectionFlag, IntPtr hwndParent) 
+               public X509Certificate2Collection Select (string title, string message, X509SelectionFlag selectionFlag, IntPtr hwndParent) 
                {
                        return null;
                }
index 60d65c930bded2eccae713e5b010d11ad0a83432..343ee097becc47baef18b656d14bd7546d53c435 100755 (executable)
@@ -1,12 +1,11 @@
 //
-// X509CertificateExEnumerator.cs - System.Security.Cryptography.X509Certificates.X509CertificateExEnumerator
+// System.Security.Cryptography.X509Certificates.X509Certificate2Enumerator class
 //
 // Author:
-//     Sebastien Pouliot (spouliot@motus.com)
+//     Sebastien Pouliot  <sebastien@ximian.com>
 //
 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-//
-
+// Copyright (C) 2005 Novell Inc. (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 
 #if NET_2_0
 
-using System;
 using System.Collections;
 
 namespace System.Security.Cryptography.X509Certificates {
 
-       // Note: Match the definition of framework version 1.2.3400.0 on http://longhorn.msdn.microsoft.com
-
-       public sealed class X509CertificateExEnumerator : IEnumerator {
+       public sealed class X509Certificate2Enumerator : IEnumerator {
 
                private IEnumerator enumerator;
 
-               internal X509CertificateExEnumerator (X509CertificateExCollection collection) 
+               internal X509Certificate2Enumerator (X509Certificate2Collection collection) 
                {
                        enumerator = ((IEnumerable) collection).GetEnumerator ();
                }
 
                // properties
 
-               public X509CertificateEx Current {
-                       get { return (X509CertificateEx) enumerator.Current; }
+               public X509Certificate2 Current {
+                       get { return (X509Certificate2) enumerator.Current; }
                }
 
                object IEnumerator.Current {
@@ -70,4 +66,4 @@ namespace System.Security.Cryptography.X509Certificates {
        }
 }
 
-#endif
\ No newline at end of file
+#endif
index b596ff8e79ab43b5df4408509030123c049de3fe..88e67e5c1e657c5f980bb07c2ca74748b36fdd65 100755 (executable)
@@ -83,7 +83,7 @@ namespace System.Security.Cryptography.X509Certificates {
                // methods
 
                [MonoTODO]
-               public bool Build (X509CertificateEx certificate)
+               public bool Build (X509Certificate2 certificate)
                {
                        return false;
                }
index fc7c9a5e9bd2d8e5f1266d85c851ba3bec049d61..0d067ce2170c7a82833837b12cd28de37b09cb6c 100755 (executable)
@@ -2,11 +2,10 @@
 // X509ChainElement.cs - System.Security.Cryptography.X509Certificates.X509ChainElement
 //
 // Author:
-//     Sebastien Pouliot (spouliot@motus.com)
+//     Sebastien Pouliot  <sebastien@ximian.com>
 //
 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-//
-
+// Copyright (C) 2005 Novell Inc. (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 
 #if NET_2_0
 
-using System;
-
 namespace System.Security.Cryptography.X509Certificates {
 
-       // Note: Match the definition of framework version 1.2.3400.0 on http://longhorn.msdn.microsoft.com
-
        public class X509ChainElement {
 
                // constructors
 
                // only accessible from X509Chain.ChainElements
-               internal X509ChainElement () {}
+               internal X509ChainElement ()
+               {
+               }
 
                // properties
 
                [MonoTODO]
-               public X509CertificateEx Certificate {
+               public X509Certificate2 Certificate {
                        get { return null; }
                }
 
@@ -62,4 +59,4 @@ namespace System.Security.Cryptography.X509Certificates {
        }
 }
 
-#endif
\ No newline at end of file
+#endif
index 569076d9cc59f907cf945e73ab091c50ef0e8c8b..bfd74c181ee8710e75274cce4aec71f489fb8e45 100755 (executable)
@@ -1,5 +1,5 @@
 //
-// X509ChainPolicy.cs - System.Security.Cryptography.X509Certificates.X509ChainPolicy
+// System.Security.Cryptography.X509Certificates.X509ChainPolicy class
 //
 // Author:
 //     Sebastien Pouliot  <sebastien@ximian.com>
@@ -35,7 +35,7 @@ namespace System.Security.Cryptography.X509Certificates {
 
                private OidCollection _apps;
                private OidCollection _cert;
-               private X509CertificateExCollection _store;
+               private X509Certificate2Collection _store;
                private X509RevocationFlag _rflag;
                private X509RevocationMode _mode;
                private TimeSpan _timeout;
@@ -59,7 +59,7 @@ namespace System.Security.Cryptography.X509Certificates {
                        get { return _cert; }
                }
 
-               public X509CertificateExCollection ExtraStore {
+               public X509Certificate2Collection ExtraStore {
                        get { return _store; }
                }
 
@@ -94,7 +94,7 @@ namespace System.Security.Cryptography.X509Certificates {
                {
                        _apps = new OidCollection ();
                        _cert = new OidCollection ();
-                       _store = new X509CertificateExCollection ();
+                       _store = new X509Certificate2Collection ();
                        _rflag = X509RevocationFlag.ExcludeRoot;
                        _mode = X509RevocationMode.Online;
                        _timeout = new TimeSpan (0);
index 945e94ff4d9e8a67aff559a33c3c3bb21b0d404b..38f712a59d6ebddc766791580c7009f224722cd9 100755 (executable)
@@ -1,11 +1,11 @@
 //
-// X509Store.cs - System.Security.Cryptography.X509Certificates.X509Store
+// System.Security.Cryptography.X509Certificates.X509Store class
 //
 // Author:
 //     Sebastien Pouliot  <sebastien@ximian.com>
 //
 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -29,8 +29,6 @@
 
 #if NET_2_0
 
-using System;
-
 using Mono.Security.X509;
 
 namespace System.Security.Cryptography.X509Certificates {
@@ -39,7 +37,7 @@ namespace System.Security.Cryptography.X509Certificates {
 
                private string _name;
                private StoreLocation _location;
-               private X509CertificateExCollection _certs;
+               private X509Certificate2Collection _certs;
                private OpenFlags _flags;
 
                // constructors
@@ -82,10 +80,10 @@ namespace System.Security.Cryptography.X509Certificates {
 
                // properties
 
-               public X509CertificateExCollection Certificates {
+               public X509Certificate2Collection Certificates {
                        get { 
                                if (_certs == null)
-                                       _certs = new X509CertificateExCollection ();
+                                       _certs = new X509Certificate2Collection ();
                                return _certs; 
                        }
                } 
@@ -115,7 +113,7 @@ namespace System.Security.Cryptography.X509Certificates {
                }
 
                [MonoTODO ("call Mono.Security.X509.X509Store*")]
-               public void Add (X509CertificateEx certificate)
+               public void Add (X509Certificate2 certificate)
                {
                        if (certificate == null)
                                throw new ArgumentNullException ("certificate");
@@ -131,13 +129,13 @@ namespace System.Security.Cryptography.X509Certificates {
                        }
                }
 
-               public void AddRange (X509CertificateExCollection certificates)
+               public void AddRange (X509Certificate2Collection certificates)
                {
                        if (certificates == null)
                                throw new ArgumentNullException ("certificates");
 
                        if (!ReadOnly) {
-                               foreach (X509CertificateEx certificate in certificates) {
+                               foreach (X509Certificate2 certificate in certificates) {
                                        Add (certificate);
                                }
                        }
@@ -159,7 +157,7 @@ namespace System.Security.Cryptography.X509Certificates {
                }
 
                [MonoTODO ("call Mono.Security.X509.X509Store*")]
-               public void Remove (X509CertificateEx certificate) 
+               public void Remove (X509Certificate2 certificate) 
                {
                        if (certificate == null)
                                throw new ArgumentNullException ("certificate");
@@ -175,13 +173,13 @@ namespace System.Security.Cryptography.X509Certificates {
                        }
                }
 
-               public void RemoveRange (X509CertificateExCollection certificates) 
+               public void RemoveRange (X509Certificate2Collection certificates) 
                {
                        if (certificates == null)
                                throw new ArgumentNullException ("certificates");
 
                        if (!this.ReadOnly) {
-                               foreach (X509CertificateEx certificate in certificates) {
+                               foreach (X509Certificate2 certificate in certificates) {
                                        Remove (certificate);
                                }
                        }