+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.
//
-// 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
namespace System.Security.Cryptography.X509Certificates {
- public class X509CertificateEx : X509Certificate {
+ public class X509Certificate2 : X509Certificate {
private bool _archived;
private X509ExtensionCollection _extensions;
// 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);
}
//
-// 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");
}
// note: transactional
- public void AddRange (X509CertificateEx[] certificates)
+ public void AddRange (X509Certificate2[] certificates)
{
if (certificates == null)
throw new ArgumentNullException ("certificates");
}
// note: transactional
- public void AddRange (X509CertificateExCollection certificates)
+ public void AddRange (X509Certificate2Collection certificates)
{
if (certificates == null)
throw new ArgumentNullException ("certificates");
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;
}
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;
}
{
}
- public void Insert (int index, X509CertificateEx certificate)
+ public void Insert (int index, X509Certificate2 certificate)
{
if (certificate == null)
throw new ArgumentNullException ("certificate");
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
}
// 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;
}
//
-// 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 {
}
}
-#endif
\ No newline at end of file
+#endif
// methods
[MonoTODO]
- public bool Build (X509CertificateEx certificate)
+ public bool Build (X509Certificate2 certificate)
{
return false;
}
// 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; }
}
}
}
-#endif
\ No newline at end of file
+#endif
//
-// X509ChainPolicy.cs - System.Security.Cryptography.X509Certificates.X509ChainPolicy
+// System.Security.Cryptography.X509Certificates.X509ChainPolicy class
//
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
private OidCollection _apps;
private OidCollection _cert;
- private X509CertificateExCollection _store;
+ private X509Certificate2Collection _store;
private X509RevocationFlag _rflag;
private X509RevocationMode _mode;
private TimeSpan _timeout;
get { return _cert; }
}
- public X509CertificateExCollection ExtraStore {
+ public X509Certificate2Collection ExtraStore {
get { return _store; }
}
{
_apps = new OidCollection ();
_cert = new OidCollection ();
- _store = new X509CertificateExCollection ();
+ _store = new X509Certificate2Collection ();
_rflag = X509RevocationFlag.ExcludeRoot;
_mode = X509RevocationMode.Online;
_timeout = new TimeSpan (0);
//
-// 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
#if NET_2_0
-using System;
-
using Mono.Security.X509;
namespace System.Security.Cryptography.X509Certificates {
private string _name;
private StoreLocation _location;
- private X509CertificateExCollection _certs;
+ private X509Certificate2Collection _certs;
private OpenFlags _flags;
// constructors
// properties
- public X509CertificateExCollection Certificates {
+ public X509Certificate2Collection Certificates {
get {
if (_certs == null)
- _certs = new X509CertificateExCollection ();
+ _certs = new X509Certificate2Collection ();
return _certs;
}
}
}
[MonoTODO ("call Mono.Security.X509.X509Store*")]
- public void Add (X509CertificateEx certificate)
+ public void Add (X509Certificate2 certificate)
{
if (certificate == null)
throw new ArgumentNullException ("certificate");
}
}
- 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);
}
}
}
[MonoTODO ("call Mono.Security.X509.X509Store*")]
- public void Remove (X509CertificateEx certificate)
+ public void Remove (X509Certificate2 certificate)
{
if (certificate == null)
throw new ArgumentNullException ("certificate");
}
}
- 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);
}
}