ImportCertificate Method
Imports a certificate from a file into the current certificate store.
Syntax
public void importCertificate(String certFile, String password, String subject);
Remarks
This method will import a certificate from a file into the current certificate store.
This method imports the PFX (PKCS12) file specified by CertFile to the Java Key Store (JKS) specified by Store.
The Password parameter specifies the certificate password (if any).
Subject is optional. If empty, the first certificate in the store is loaded instead of the matching certificate.
ImportCertificate Example
//Import a PFX
certmgr.ImportCertificate("..\\test.pfx", "password", "*");
//Import a public certificate (CER)
certmgr.ImportCertificate("..\\test.cer", "", "*");