You've already forked linux-packaging-mono
Imported Upstream version 4.4.0.122
Former-commit-id: a99f46acaeba3ab496c7afc02c29b839e30a0d0b
This commit is contained in:
@@ -109,17 +109,44 @@ namespace System.Security.Cryptography.X509Certificates {
|
||||
impl = X509Helper.InitFromHandle (handle);
|
||||
}
|
||||
|
||||
internal X509Certificate (X509CertificateImpl impl)
|
||||
{
|
||||
if (impl == null)
|
||||
throw new ArgumentNullException ("impl");
|
||||
|
||||
this.impl = X509Helper.InitFromCertificate (impl);
|
||||
}
|
||||
|
||||
public X509Certificate (System.Security.Cryptography.X509Certificates.X509Certificate cert)
|
||||
{
|
||||
if (cert == null)
|
||||
throw new ArgumentNullException ("cert");
|
||||
|
||||
X509Helper.ThrowIfContextInvalid (cert.impl);
|
||||
|
||||
impl = X509Helper.InitFromCertificate (cert.impl);
|
||||
impl = X509Helper.InitFromCertificate (cert);
|
||||
hideDates = false;
|
||||
}
|
||||
|
||||
internal void ImportHandle (X509CertificateImpl impl)
|
||||
{
|
||||
Reset ();
|
||||
this.impl = impl;
|
||||
}
|
||||
|
||||
internal X509CertificateImpl Impl {
|
||||
get {
|
||||
X509Helper.ThrowIfContextInvalid (impl);
|
||||
return impl;
|
||||
}
|
||||
}
|
||||
|
||||
internal bool IsValid {
|
||||
get { return X509Helper.IsValid (impl); }
|
||||
}
|
||||
|
||||
internal void ThrowIfContextInvalid ()
|
||||
{
|
||||
X509Helper.ThrowIfContextInvalid (impl);
|
||||
}
|
||||
|
||||
// public methods
|
||||
|
||||
@@ -161,7 +188,7 @@ namespace System.Security.Cryptography.X509Certificates {
|
||||
return null;
|
||||
X509Helper.ThrowIfContextInvalid (impl);
|
||||
|
||||
return impl.GetEffectiveDateString ().ToString ();
|
||||
return impl.GetValidFrom ().ToLocalTime ().ToString ();
|
||||
}
|
||||
|
||||
// strangly there are no DateTime returning function
|
||||
@@ -171,7 +198,7 @@ namespace System.Security.Cryptography.X509Certificates {
|
||||
return null;
|
||||
X509Helper.ThrowIfContextInvalid (impl);
|
||||
|
||||
return impl.GetExpirationDateString ().ToString ();
|
||||
return impl.GetValidUntil ().ToLocalTime ().ToString ();
|
||||
}
|
||||
|
||||
// well maybe someday there'll be support for PGP or SPKI ?
|
||||
|
||||
Reference in New Issue
Block a user