Package de.brendamour.jpasskit.signing
Class PKSigningInformationUtil
- java.lang.Object
-
- de.brendamour.jpasskit.signing.PKSigningInformationUtil
-
public class PKSigningInformationUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description PKSigningInformationUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.security.cert.X509CertificateloadDERCertificate(java.io.InputStream certificateInputStream)Deprecated.java.security.cert.X509CertificateloadDERCertificate(java.lang.String filePath)Deprecated.java.security.KeyStoreloadPKCS12File(java.io.InputStream inputStreamOfP12, java.lang.String password)Deprecated.java.security.KeyStoreloadPKCS12File(java.lang.String pathToP12, java.lang.String password)Deprecated.PKSigningInformationloadSigningInformation(java.lang.String keyStoreFilePath, java.lang.String keyStorePassword, java.lang.String appleWWDRCAFilePath)Load all signing information necessary for pass generation from the filesystem or classpath.PKSigningInformationloadSigningInformationFromPKCS12AndIntermediateCertificate(java.io.InputStream keyStoreInputStream, java.lang.String keyStorePassword, java.io.InputStream appleWWDRCAFileInputStream)Load all signing information necessary for pass generation using two input streams for the key store and the Apple WWDRCA certificate.PKSigningInformationloadSigningInformationFromPKCS12AndIntermediateCertificate(java.lang.String keyPath, java.lang.String keyPassword, java.lang.String appleWWDRCAFilePath)Load all signing information necessary for pass generation from the filesystem or classpath.
-
-
-
Method Detail
-
loadSigningInformation
public PKSigningInformation loadSigningInformation(java.lang.String keyStoreFilePath, java.lang.String keyStorePassword, java.lang.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(java.lang.String keyPath, java.lang.String keyPassword, java.lang.String appleWWDRCAFilePath) throws java.io.IOException, java.security.cert.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:
java.io.IOExceptionjava.lang.IllegalStateExceptionjava.security.cert.CertificateException
-
loadSigningInformationFromPKCS12AndIntermediateCertificate
public PKSigningInformation loadSigningInformationFromPKCS12AndIntermediateCertificate(java.io.InputStream keyStoreInputStream, java.lang.String keyStorePassword, java.io.InputStream appleWWDRCAFileInputStream) throws java.io.IOException, java.security.cert.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:
java.io.IOExceptionjava.lang.IllegalStateExceptionjava.security.cert.CertificateException
-
loadPKCS12File
@Deprecated public java.security.KeyStore loadPKCS12File(java.lang.String pathToP12, java.lang.String password) throws java.security.cert.CertificateException, java.io.IOExceptionDeprecated.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:
java.io.IOExceptionjava.security.cert.CertificateExceptionjava.lang.IllegalArgumentException
-
loadPKCS12File
@Deprecated public java.security.KeyStore loadPKCS12File(java.io.InputStream inputStreamOfP12, java.lang.String password) throws java.security.cert.CertificateException, java.io.IOExceptionDeprecated.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:
java.io.IOExceptionjava.security.cert.CertificateExceptionjava.lang.IllegalArgumentException- If the parameterinputStreamOfP12isnull.
-
loadDERCertificate
@Deprecated public java.security.cert.X509Certificate loadDERCertificate(java.lang.String filePath) throws java.io.IOException, java.security.cert.CertificateExceptionDeprecated.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:
java.io.IOExceptionjava.security.cert.CertificateException
-
loadDERCertificate
@Deprecated public java.security.cert.X509Certificate loadDERCertificate(java.io.InputStream certificateInputStream) throws java.io.IOException, java.security.cert.CertificateExceptionDeprecated.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:
java.io.IOExceptionjava.security.cert.CertificateException
-
-