public final class CertificateUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static Certificate |
loadCertificate(InputStream inputStream)
Load Certificate from a input stream
|
static Certificate |
loadCertificate(String filePath)
Load Certificate from system file path
|
static KeyStore |
loadKeyStore(String keyStorePath,
String keyStoreType,
String keyStorePassword)
Load KeyStore from given path and type
|
public static Certificate loadCertificate(String filePath) throws FileNotFoundException, CertificateException
filePath - Path of certificate fileFileNotFoundException - if file is not foundCertificateException - if any error occurred while reading certificatepublic static Certificate loadCertificate(InputStream inputStream) throws CertificateException
inputStream - InputStream containing certificate dataCertificateException - if any error occurred while reading certificate from streampublic static KeyStore loadKeyStore(String keyStorePath, String keyStoreType, String keyStorePassword) throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException
keyStorePath - file pathkeyStoreType - keystore type (JKS/PKCS12 etc)keyStorePassword - keystore passwordKeyStoreExceptionCertificateExceptionNoSuchAlgorithmExceptionIOExceptionCopyright © 2022. All rights reserved.