|
@@ -63,12 +63,23 @@ namespace System.Security.Cryptography.X509Certificates {
|
|
|
_cert = new MX.X509Certificate (this.RawData);
|
|
_cert = new MX.X509Certificate (this.RawData);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public X509Certificate2 (byte[] rawData, SecureString password) : base (rawData, password)
|
|
|
|
|
+ {
|
|
|
|
|
+ _cert = new MX.X509Certificate (this.RawData);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public X509Certificate2 (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags)
|
|
public X509Certificate2 (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags)
|
|
|
: base (rawData, password, keyStorageFlags)
|
|
: base (rawData, password, keyStorageFlags)
|
|
|
{
|
|
{
|
|
|
_cert = new MX.X509Certificate (this.RawData);
|
|
_cert = new MX.X509Certificate (this.RawData);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public X509Certificate2 (byte[] rawData, SecureString password, X509KeyStorageFlags keyStorageFlags)
|
|
|
|
|
+ : base (rawData, password, keyStorageFlags)
|
|
|
|
|
+ {
|
|
|
|
|
+ _cert = new MX.X509Certificate (this.RawData);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public X509Certificate2 (string fileName) : base (fileName)
|
|
public X509Certificate2 (string fileName) : base (fileName)
|
|
|
{
|
|
{
|
|
|
_cert = new MX.X509Certificate (this.RawData);
|
|
_cert = new MX.X509Certificate (this.RawData);
|
|
@@ -79,18 +90,29 @@ namespace System.Security.Cryptography.X509Certificates {
|
|
|
_cert = new MX.X509Certificate (this.RawData);
|
|
_cert = new MX.X509Certificate (this.RawData);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public X509Certificate2 (string fileName, SecureString password)
|
|
|
|
|
+ {
|
|
|
|
|
+ _cert = new MX.X509Certificate (this.RawData);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public X509Certificate2 (string fileName, string password, X509KeyStorageFlags keyStorageFlags)
|
|
public X509Certificate2 (string fileName, string password, X509KeyStorageFlags keyStorageFlags)
|
|
|
: base (fileName, password, keyStorageFlags)
|
|
: base (fileName, password, keyStorageFlags)
|
|
|
{
|
|
{
|
|
|
_cert = new MX.X509Certificate (this.RawData);
|
|
_cert = new MX.X509Certificate (this.RawData);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public X509Certificate2 (string fileName, SecureString password, X509KeyStorageFlags keyStorageFlags)
|
|
|
|
|
+ : base (fileName, password, keyStorageFlags)
|
|
|
|
|
+ {
|
|
|
|
|
+ _cert = new MX.X509Certificate (this.RawData);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public X509Certificate2 (IntPtr handle) : base (handle)
|
|
public X509Certificate2 (IntPtr handle) : base (handle)
|
|
|
{
|
|
{
|
|
|
_cert = new MX.X509Certificate (this.RawData);
|
|
_cert = new MX.X509Certificate (this.RawData);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public X509Certificate2 (X509Certificate2 certificate)
|
|
|
|
|
|
|
+ public X509Certificate2 (X509Certificate certificate)
|
|
|
{
|
|
{
|
|
|
_cert = new MX.X509Certificate (this.RawData);
|
|
_cert = new MX.X509Certificate (this.RawData);
|
|
|
}
|
|
}
|
|
@@ -111,6 +133,11 @@ namespace System.Security.Cryptography.X509Certificates {
|
|
|
set { _name = value; }
|
|
set { _name = value; }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ [MonoTODO]
|
|
|
|
|
+ public bool HasPrivateKey {
|
|
|
|
|
+ get { return false; }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
[MonoTODO]
|
|
[MonoTODO]
|
|
|
public X500DistinguishedName IssuerName {
|
|
public X500DistinguishedName IssuerName {
|
|
|
get { return null; }
|
|
get { return null; }
|
|
@@ -203,6 +230,11 @@ namespace System.Security.Cryptography.X509Certificates {
|
|
|
base.Import (rawData, password, keyStorageFlags);
|
|
base.Import (rawData, password, keyStorageFlags);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public override void Import (byte[] rawData, SecureString password, X509KeyStorageFlags keyStorageFlags)
|
|
|
|
|
+ {
|
|
|
|
|
+ base.Import (rawData, password, keyStorageFlags);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public override void Import (string fileName)
|
|
public override void Import (string fileName)
|
|
|
{
|
|
{
|
|
|
base.Import (fileName);
|
|
base.Import (fileName);
|
|
@@ -213,6 +245,11 @@ namespace System.Security.Cryptography.X509Certificates {
|
|
|
base.Import (fileName, password, keyStorageFlags);
|
|
base.Import (fileName, password, keyStorageFlags);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public override void Import (string fileName, SecureString password, X509KeyStorageFlags keyStorageFlags)
|
|
|
|
|
+ {
|
|
|
|
|
+ base.Import (fileName, password, keyStorageFlags);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public override void Reset ()
|
|
public override void Reset ()
|
|
|
{
|
|
{
|
|
|
_serial = null;
|
|
_serial = null;
|
|
@@ -232,6 +269,16 @@ namespace System.Security.Cryptography.X509Certificates {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ [MonoTODO]
|
|
|
|
|
+ public bool Verify ()
|
|
|
|
|
+ {
|
|
|
|
|
+ X509Chain chain = new X509Chain ();
|
|
|
|
|
+ if (!chain.Build (this))
|
|
|
|
|
+ return false;
|
|
|
|
|
+ // TODO - check chain and other stuff ???
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// static methods
|
|
// static methods
|
|
|
|
|
|
|
|
[MonoTODO]
|
|
[MonoTODO]
|