/// <summary>
/// Loads the private key for the certificate with an optional password.
/// </summary>
public async Task <X509Certificate2> LoadPrivateKey(String password)
{
if (this.StoreType == CertificateStoreType.Directory)
{
using (DirectoryCertificateStore store = new DirectoryCertificateStore())
{
store.Open(this.StorePath);
m_certificate = store.LoadPrivateKey(this.Thumbprint, this.SubjectName, password);
return(m_certificate);
}
}
return(await Find(true));
}