public class PKSigningInformationUtil extends Object
| Constructor and Description |
|---|
PKSigningInformationUtil() |
| Modifier and Type | Method and Description |
|---|---|
X509Certificate |
loadDERCertificate(InputStream certificateInputStream)
Load a DER Certificate from an
InputStream. |
X509Certificate |
loadDERCertificate(String filePath)
Load certificate file in DER format from the filesystem or the classpath
|
KeyStore |
loadPKCS12File(InputStream inputStreamOfP12,
String password)
Load the keystore from an already opened input stream.
|
KeyStore |
loadPKCS12File(String pathToP12,
String password)
Load PKCS12 keystore file from file (will try to load it from the classpath)
|
PKSigningInformation |
loadSigningInformationFromPKCS12AndIntermediateCertificate(InputStream pkcs12KeyStoreInputStream,
String keyStorePassword,
InputStream appleWWDRCAFileInputStream)
Load all signing information necessary for pass generation using two input streams for the key store and the Apple WWDRCA certificate.
|
PKSigningInformation |
loadSigningInformationFromPKCS12AndIntermediateCertificate(String pkcs12KeyStoreFilePath,
String keyStorePassword,
String appleWWDRCAFilePath)
Load all signing information necessary for pass generation from the filesystem or classpath.
|
public PKSigningInformation loadSigningInformationFromPKCS12AndIntermediateCertificate(String pkcs12KeyStoreFilePath, String keyStorePassword, String appleWWDRCAFilePath) throws IOException, NoSuchAlgorithmException, CertificateException, KeyStoreException, NoSuchProviderException, UnrecoverableKeyException
pkcs12KeyStoreFilePath - path to keystore (classpath or filesystem)keyStorePassword - Password used to access the key storeappleWWDRCAFilePath - path to apple's WWDRCA certificate file (classpath or filesystem)PKSigningInformation object filled with all certificates from the provided filesIOExceptionNoSuchAlgorithmExceptionCertificateExceptionKeyStoreExceptionNoSuchProviderExceptionUnrecoverableKeyExceptionpublic PKSigningInformation loadSigningInformationFromPKCS12AndIntermediateCertificate(InputStream pkcs12KeyStoreInputStream, String keyStorePassword, InputStream appleWWDRCAFileInputStream) throws IOException, NoSuchAlgorithmException, CertificateException, KeyStoreException, NoSuchProviderException, UnrecoverableKeyException
pkcs12KeyStoreInputStream - InputStream of the key storekeyStorePassword - Password used to access the key storeappleWWDRCAFileInputStream - InputStream of the Apple WWDRCA certificate.IOExceptionNoSuchAlgorithmExceptionCertificateExceptionKeyStoreExceptionNoSuchProviderExceptionUnrecoverableKeyExceptionpublic KeyStore loadPKCS12File(String pathToP12, String password) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException
pathToP12 - path to PKCS 12 file (on the filesystem or classpath)password - password to access the key storeIOExceptionNoSuchAlgorithmExceptionCertificateExceptionKeyStoreExceptionNoSuchProviderExceptionpublic KeyStore loadPKCS12File(InputStream inputStreamOfP12, String password) throws IOException, NoSuchAlgorithmException, CertificateException, KeyStoreException, NoSuchProviderException
inputStreamOfP12 - InputStream containing the signing key store.password - Password to access the key storeinputStreamOfP12IOExceptionNoSuchAlgorithmExceptionCertificateExceptionKeyStoreExceptionNoSuchProviderExceptionIllegalArgumentException - If the parameter inputStreamOfP12 is null.public X509Certificate loadDERCertificate(String filePath) throws IOException, CertificateException
filePath - IOExceptionCertificateExceptionpublic X509Certificate loadDERCertificate(InputStream certificateInputStream) throws IOException, CertificateException
InputStream.
The caller is responsible for closing the stream after this method returns successfully or fails.certificateInputStream - InputStream containing the certificate.IOExceptionCertificateExceptionCopyright © 2012–2015. All rights reserved.