public class PKSigningInformationUtil extends Object
| Constructor | Description |
|---|---|
PKSigningInformationUtil() |
| Modifier and Type | Method | 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 |
loadSigningInformation(String pkcs12KeyStoreFilePath,
String keyStorePassword,
String appleWWDRCAFilePath) |
Load all signing information necessary for pass generation from the filesystem or 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 loadSigningInformation(String pkcs12KeyStoreFilePath, String keyStorePassword, String appleWWDRCAFilePath) throws PKSigningException
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 filesPKSigningExceptionpublic PKSigningInformation loadSigningInformationFromPKCS12AndIntermediateCertificate(String pkcs12KeyStoreFilePath, String keyStorePassword, String appleWWDRCAFilePath) throws IOException, NoSuchAlgorithmException, CertificateException, KeyStoreException, 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 filesIOExceptionNoSuchAlgorithmExceptionCertificateExceptionKeyStoreExceptionUnrecoverableKeyExceptionpublic PKSigningInformation loadSigningInformationFromPKCS12AndIntermediateCertificate(InputStream pkcs12KeyStoreInputStream, String keyStorePassword, InputStream appleWWDRCAFileInputStream) throws IOException, NoSuchAlgorithmException, CertificateException, KeyStoreException, UnrecoverableKeyException
pkcs12KeyStoreInputStream - InputStream of the key storekeyStorePassword - Password used to access the key storeappleWWDRCAFileInputStream - InputStream of the Apple WWDRCA certificate.IOExceptionNoSuchAlgorithmExceptionCertificateExceptionKeyStoreExceptionUnrecoverableKeyExceptionpublic 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 storeIOExceptionNoSuchAlgorithmExceptionCertificateExceptionKeyStoreExceptionIllegalArgumentExceptionpublic KeyStore loadPKCS12File(InputStream inputStreamOfP12, String password) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException
inputStreamOfP12 - InputStream containing the signing key store.password - Password to access the key storeinputStreamOfP12IOExceptionNoSuchAlgorithmExceptionCertificateExceptionKeyStoreExceptionIllegalArgumentException - If the parameter inputStreamOfP12 is null.public X509Certificate loadDERCertificate(String filePath) throws IOException, CertificateException
filePath - Path to the file, containing the certificate.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–2018. All rights reserved.