frozon / passbook

Passbook gem let's you create pkpass for passbook iOS 6
MIT License
235 stars 66 forks source link

Signature error unter iOS 7 #32

Closed MSchmidt closed 11 years ago

MSchmidt commented 11 years ago

I'm seeing this error when I try to download and open a pkpass under iOS 7

Invalid data error reading pass pass.com.domain.discount/2500000.
The passTypeIdentifier or teamIdentifier provided may not match your certificate, or the certificate trust chain could not be verified.
Error adding pass The pass cannot be read because it isn’t valid.

However ,the passTypeIdentifier and teamIdentifier seem to be correct since everything works fine under iOS 6 and even Safari from Mavericks.

As far as I can tell, the only difference in the signing process with iOS 7 is that the signature needs to contain a signing date.

lgleasain commented 11 years ago

Thanks for the heads up. We are looking into this. Is this something you are seeing on a production website or just something you are playing around with?

MSchmidt commented 11 years ago

Production. Here is a link to one of those passes: http://bit.ly/1gZ2HdD

lgleasain commented 11 years ago

Ok, from what I can tell Apple has tightened up the validation especially on the fields on the back of passes in the new passbook format. I was able to reproduce your issue with another custom created pass. If I take the example pass files from the passbook examples on Apple's website, change the passTypeIdentifier and teamIdentifier to match mine and then build the pass they work. I would start with the format that apple has in it's example pass and then start to change things slowly until you figure out what is breaking things with the tighter validation.

Let us know if that solves the problem for you.

frozon commented 11 years ago

Hello,

Spend some time to check. I had the same issue to begin with.

My pass opened correctly in iOS6 but not on iOS7. My apple developer subscription ended so I had to renew it and I had some changes with my previous configuration.

passTypeIdentifier and teamIdentifier changed from my earlier subscription in my certs. Once updated with my latest informations gathered from Keychain -> Passbook cert -> right click -> Informations it is working like a charm on iOS7

Please ensure that your informations are valid with the one provided in your cert and everything should work on iOS7.

For information: when we sign pass, we use OpenSSL::PKCS7.write_smime which already take care of filling signing-time smime attributes as specified in OpenSSL doc.

MSchmidt commented 11 years ago

Thanks a lot! You are absolutely right. We tried to rebuild our certificate in the very beginning when the issue first occurred and were pretty sure this wasn't the cause since then. With an all clean Pass ID and Certificate it works just fine. Sorry for the false alarm and thanks a ton for this brilliant gem!

frozon commented 11 years ago

You're welcome.