Package com.adyen.util
Class CertificateUtil
- java.lang.Object
-
- com.adyen.util.CertificateUtil
-
public final class CertificateUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CertificateloadCertificate(InputStream inputStream)Load Certificate from a input streamstatic CertificateloadCertificate(String filePath)Load Certificate from system file pathstatic KeyStoreloadKeyStore(String keyStorePath, String keyStoreType, String keyStorePassword)Load KeyStore from given path and type
-
-
-
Method Detail
-
loadCertificate
public static Certificate loadCertificate(String filePath) throws FileNotFoundException, CertificateException
Load Certificate from system file path- Parameters:
filePath- Path of certificate file- Returns:
- Certificate
- Throws:
FileNotFoundException- if file is not foundCertificateException- if any error occurred while reading certificate
-
loadCertificate
public static Certificate loadCertificate(InputStream inputStream) throws CertificateException
Load Certificate from a input stream- Parameters:
inputStream- InputStream containing certificate data- Returns:
- Certificate
- Throws:
CertificateException- if any error occurred while reading certificate from stream
-
loadKeyStore
public static KeyStore loadKeyStore(String keyStorePath, String keyStoreType, String keyStorePassword) throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException
Load KeyStore from given path and type- Parameters:
keyStorePath- file pathkeyStoreType- keystore type (JKS/PKCS12 etc)keyStorePassword- keystore password- Returns:
- Throws:
KeyStoreExceptionCertificateExceptionNoSuchAlgorithmExceptionIOException
-
-