Package com.itextpdf.test.signutils
Class Pkcs12FileHelper
java.lang.Object
com.itextpdf.test.signutils.Pkcs12FileHelper
This class doesn't support bouncy-castle FIPS so it shall not be used in itextcore.
-
Method Summary
Modifier and TypeMethodDescriptionstatic KeyStore
static Certificate[]
readFirstChain
(String p12FileName, char[] ksPass) static PrivateKey
readFirstKey
(String p12FileName, char[] ksPass, char[] keyPass) static PrivateKey
readPrivateKeyFromPKCS12KeyStore
(InputStream keyStore, String pkAlias, char[] pkPassword)
-
Method Details
-
readFirstChain
public static Certificate[] readFirstChain(String p12FileName, char[] ksPass) throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException -
readPrivateKeyFromPKCS12KeyStore
public static PrivateKey readPrivateKeyFromPKCS12KeyStore(InputStream keyStore, String pkAlias, char[] pkPassword) throws GeneralSecurityException, IOException - Throws:
-
GeneralSecurityException
-
IOException
-
readFirstKey
public static PrivateKey readFirstKey(String p12FileName, char[] ksPass, char[] keyPass) throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException, UnrecoverableKeyException -
initStore
public static KeyStore initStore(String p12FileName, char[] ksPass, Provider provider) throws KeyStoreException, IOException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException
-