devartis / passbook

Python library to create Apple Passbook (.pkpass) files
http://www.devartis.com/
MIT License
275 stars 110 forks source link

obtain cert.pem and key.pem #1

Closed ogonbat closed 12 years ago

ogonbat commented 12 years ago

Hi, i have a question.

i have created the certificate into the provisioning portal. i have downloaded the .cert file form this portal. so, how i obtain the certificate and the key.pem file. sorry for this stupid and newbie question but i'm not a crypto expert :-)

fara commented 12 years ago

Hi, you need to export the certificate as a .p12 file with the Keychain application from OSX. Afterwards you can get the certificate and key files from the command line like this:

openssl pkcs12 -in "Certificates.p12" -clcerts -nokeys -out certificate.pem openssl pkcs12 -in "Certificates.p12" -nocerts -out key.pem

I'll update the README with more instructions shortly.

ogonbat commented 12 years ago

Hi fara

thank's for your reply i have only one question in the Apple documentation, in the "Passes Are Cryptographically Signed and Compressed" is explained how to make a signature file and: "".....Include the WWDR intermediate certificate as part of the signature; you can download this certificate from Apple’s website...." this is the link:

https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/PassKit_PG/Chapters/Creating.html#//apple_ref/doc/uid/TP40012195-CH4-SW1

this is not supported in your methods, i think this is true? have a nice day

wannabehero commented 12 years ago

Hi, ogonbat.

I faced with WWDR problem yesterday :) I solved it and made a pull request. Will just hope, that fata noticed it :)

fara commented 12 years ago

spronin, ogonbat, yes, intermediate signing was missing since it's something new. I'm closing this issue now since spronin created a separate issue for that.