ryantenney / passkit4j

Java library for generating Apple Passbook (.pkpass) files
http://www.ryantenney.com/passkit4j/
Apache License 2.0
80 stars 50 forks source link

Help while signing #40

Closed josete89 closed 8 years ago

josete89 commented 8 years ago

Hi

I'm getting this error :

passbookscala [ERROR] [08/22/2016 18:43:53.859] Provided KeyStore contains multiple aliases, please specify an alias passbookscala com.ryantenney.passkit4j.sign.PassSigningException: Provided KeyStore contains multiple aliases, please specify an alias passbookscala at com.ryantenney.passkit4j.sign.PassSigningUtil.firstAlias(PassSigningUtil.java:136) passbookscala at com.ryantenney.passkit4j.sign.PassSigningUtil.getCertificate(PassSigningUtil.java:100) passbookscala at com.ryantenney.passkit4j.sign.PassSignerImpl$Builder.build(PassSignerImpl.java:111)

angela9mx commented 8 years ago

Hello josete89 could you tell me how resolve the issue "Provided KeyStore contains multiple aliases, please specify an alias"

Thank you

Regards

josete89 commented 8 years ago

Hi @angela9mx

I use this command to see the alias of the certificate: openssl pkcs12 -in cert.p12 the result is-> oqszqA== -----END CERTIFICATE----- Bag Attributes friendlyName: Alias

And then I put in the builder chain: PassSignerImpl.builder() .keystore(new FileInputStream(getResource(config.getString("passbook.certificatePath"))), config.getString("passbook.certKey")) .alias("Alias")

Regards