Opc.Ua.CertificateIdentifier.LoadPrivateKey C# (CSharp) Method

LoadPrivateKey() public method

Loads the private key for the certificate with an optional password.
public LoadPrivateKey ( String password ) : Task
password String
return Task
        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);
        }