IPWorks WebSockets 2020 Kotlin Edition

Questions / Feedback?

ImportCertificate Method

Imports a certificate from a file into the current certificate store.

Syntax

public fun importCertificate(certFile: String?, password: String?, subject: String?)

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) 2021 /n software inc. - All rights reserved.
IPWorks WebSockets 2020 Kotlin Edition - Version 20.0 [Build 7721]