I created the project using Ryan's PKPASS files, but I am finding one error in this field, I am attaching snapshot
Kavit900 opened this issue · comments
Please check out Project Lombok and how install it for eclipse: https://projectlombok.org/download.html
I'm afraid I can't help with generating PKCS12 keystores.
Perhaps this might help?
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt
I'm sorry, you aren't providing me enough information to help you.
Sir when I debuged the Program, I am getting stuck at this Part, And it says source not found at KeyStore keystore = KeyStore.getInstance(.....) , what could be reason, I think because I don't have correct bouncy jar files ??
static KeyStore loadPKCS12File(InputStream inputStream, String password) throws PassSigningException {
ensureBCProvider();
try {
KeyStore keystore = KeyStore.getInstance("PKCS12", BouncyCastleProvider.PROVIDER_NAME);
keystore.load(inputStream, chars(password));
return keystore;
} catch (Exception e) {
throw propagateAsPassSigningException("Error loading PKCS12 KeyStore", e);
} finally {
try {
if (inputStream != null) inputStream.close();
} catch (IOException e) {}
}
}
Clearly from the error you are receiving, the PKCS12 keystore file you are providing is invalid, thus "PKCS12 key store mac invalid". That is an error thrown by Bouncy Castle, not by Passkit4j.
Ok so should I create another certificate on Apple store and then import it as .p12 and try it right Sir?
Sir I when I am running this command - "openssl pkcs12 -in PassbookCert.p12 -clcerts -nokeys -out passcertificate.pem -passin pass:" then I get output - Mac verified OK then why it gives error when I provide path parameter to my java file for .p12 as Error loading PKCS12....
Sir for testing, do you have a Certificate.p12 file that you used for testing for EventExample.java and it worked, Can you upload it somewhere and paste the link here, I will try using that, I won't disturb you again Sir, Please Sir.
Thank You.
Ryan Sir, I think I am near to the error, the KeyStorePassword that we pass to PassSigningUtil is the KeyStorePassword that we had given during creation of PassTypeID from Apple site or it is any password that we can give now while creating .pkpass. Please let me know, because I think I am giving wrong password that is causing the error.
Hello Kavit900,
I am also facing same issue.
Have you cracked this exception, if so could you please help in solving this.