public final KeyStore createPkcs12KeyStore ( String keyName , char [ ] password , PrivateKey privateKey , X509Certificate certificate ) { logger . entry ( ) ; List < X509Certificate > certificates = new ArrayList <> ( ) ; certificates . add ( certificate ) ; KeyStore keyStore = createPkcs12KeyStore ( keyName , password , privateKey , certificates ) ; logger . exit ( ) ; return keyStore ; }
This method creates a new PKCS12 format key store containing a named private key and public certificate .