Package de.brendamour.jpasskit.signing
Class PKSigningInformationUtil
java.lang.Object
de.brendamour.jpasskit.signing.PKSigningInformationUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionloadDERCertificate(InputStream certificateInputStream) Deprecated.loadDERCertificate(String filePath) Deprecated.loadPKCS12File(InputStream inputStreamOfP12, String password) Deprecated.loadPKCS12File(String pathToP12, String password) Deprecated.loadSigningInformation(String keyStoreFilePath, String keyStorePassword, String appleWWDRCAFilePath) Load all signing information necessary for pass generation from the filesystem or classpath.loadSigningInformationFromPKCS12AndIntermediateCertificate(InputStream keyStoreInputStream, 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.loadSigningInformationFromPKCS12AndIntermediateCertificate(String keyPath, String keyPassword, String appleWWDRCAFilePath) Load all signing information necessary for pass generation from the filesystem or classpath.
-
Constructor Details
-
PKSigningInformationUtil
public PKSigningInformationUtil()
-
-
Method Details
-
loadSigningInformation
public PKSigningInformation loadSigningInformation(String keyStoreFilePath, String keyStorePassword, String appleWWDRCAFilePath) throws PKSigningException Load all signing information necessary for pass generation from the filesystem or classpath.- Parameters:
keyStoreFilePath- path to keystore (classpath or filesystem)keyStorePassword- Password used to access the key storeappleWWDRCAFilePath- path to apple's WWDRCA certificate file (classpath or filesystem)- Returns:
- a
PKSigningInformationobject filled with all certificates from the provided files - Throws:
PKSigningException
-
loadSigningInformationFromPKCS12AndIntermediateCertificate
public PKSigningInformation loadSigningInformationFromPKCS12AndIntermediateCertificate(String keyPath, String keyPassword, String appleWWDRCAFilePath) throws IOException, CertificateException Load all signing information necessary for pass generation from the filesystem or classpath.- Parameters:
keyPath- path to keystore (classpath or filesystem)keyPassword- Password used to access the key storeappleWWDRCAFilePath- path to apple's WWDRCA certificate file (classpath or filesystem)- Returns:
- a
PKSigningInformationobject filled with all certificates from the provided files - Throws:
IOExceptionIllegalStateExceptionCertificateException
-
loadSigningInformationFromPKCS12AndIntermediateCertificate
public PKSigningInformation loadSigningInformationFromPKCS12AndIntermediateCertificate(InputStream keyStoreInputStream, String keyStorePassword, InputStream appleWWDRCAFileInputStream) throws IOException, CertificateException Load all signing information necessary for pass generation using two input streams for the key store and the Apple WWDRCA certificate. The caller is responsible for closing the stream after this method returns successfully or fails.- Parameters:
keyStoreInputStream-InputStreamof the key storekeyStorePassword- Password used to access the key storeappleWWDRCAFileInputStream-InputStreamof the Apple WWDRCA certificate.- Returns:
- Signing information necessary to sign a pass.
- Throws:
IOExceptionIllegalStateExceptionCertificateException
-
loadPKCS12File
@Deprecated public KeyStore loadPKCS12File(String pathToP12, String password) throws CertificateException, IOException Deprecated.Load PKCS12 keystore file from file (will try to load it from the classpath)- Parameters:
pathToP12- path to PKCS 12 file (on the filesystem or classpath)password- password to access the key store- Returns:
- Key store loaded from the provided files
- Throws:
IOExceptionCertificateExceptionIllegalArgumentException
-
loadPKCS12File
@Deprecated public KeyStore loadPKCS12File(InputStream inputStreamOfP12, String password) throws CertificateException, IOException Deprecated.Load the keystore from an already opened input stream. The caller is responsible for closing the stream after this method returns successfully or fails.- Parameters:
inputStreamOfP12-InputStreamcontaining the signing key store.password- Password to access the key store- Returns:
- Key store loaded from
inputStreamOfP12 - Throws:
IOExceptionCertificateExceptionIllegalArgumentException- If the parameterinputStreamOfP12isnull.
-
loadDERCertificate
@Deprecated public X509Certificate loadDERCertificate(String filePath) throws IOException, CertificateException Deprecated.Load certificate file in DER format from the filesystem or the classpath- Parameters:
filePath- Path to the file, containing the certificate.- Returns:
- Loaded certificate.
- Throws:
IOExceptionCertificateException
-
loadDERCertificate
@Deprecated public X509Certificate loadDERCertificate(InputStream certificateInputStream) throws IOException, CertificateException Deprecated.Load a DER Certificate from anInputStream. The caller is responsible for closing the stream after this method returns successfully or fails.- Parameters:
certificateInputStream-InputStreamcontaining the certificate.- Returns:
- Loaded certificate.
- Throws:
IOExceptionCertificateException
-