IPWorks SNMP 2020 Java Edition

Questions / Feedback?

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", "", "*");

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks SNMP 2020 Java Edition - Version 20.0 [Build 8202]