public Export ( X509ContentType contentType, string password ) : byte[] | ||
contentType | X509ContentType | |
password | string | |
Результат | byte[] |
public virtual byte[] Export(X509ContentType contentType, string password)
{
VerifyContentType(contentType);
if (Pal == null)
throw new CryptographicException(ErrorCode.E_POINTER); // Not the greatest error, but needed for backward compat.
using (var safePasswordHandle = new SafePasswordHandle(password))
using (IExportPal storePal = StorePal.FromCertificate(Pal))
{
return storePal.Export(contentType, safePasswordHandle);
}
}
X509Certificate::Export ( System contentType ) : byte[] | |
X509Certificate::Export ( System contentType, System password ) : byte[] | |
X509Certificate::Export ( System contentType, string password ) : byte[] | |
X509Certificate::Export ( X509ContentType contentType ) : byte[] | |
X509Certificate::Export ( X509ContentType contentType, SecureString password ) : byte[] |
public void UpdateCertificate(X509Certificate cert) { _updateCertificate.UpdateCertificate(cert); File.WriteAllBytes(CertPathOnDisk, cert.Export(X509ContentType.Pfx, CertPassword)); _lastUpdate = DateTime.UtcNow; LogInfo("Certificate successfully updated"); }