Hello Elixir community,
I’m currently working on an app that delivers Apple Wallet passes to its users. Basically I followed the official guidelines, and implemented most of the stuff directly in Elixir. However to correctly sign the passes, Apple states the following:
To create the signature file, make a PKCS #7 detached signature of the manifest file, using the private key associated with your signing certificate. Include the WWDR intermediate certificate as part of the signature. You can download this certificate from Apple’s website. Write the signature to the file
signature
at the top level of the pass package. Include the date and time that the pass was signed using the S/MIMEsigning-time
attribute.
This sounds like alien language to me . Thankfully I also found the these guidelines which states the following command to properly sign the pass:
openssl smime -binary -sign -certfile WWDR.pem -signer passcertificate.pem -inkey passkey.pem -in manifest.json -out signature -outform DER -passin pass:12345
Everything works quite well, however is there a way to do the same without the openssl
dependency? I found the :public_key
application which is shipped with OTP, but as already mentioned, all the public key/certs stuff is very alien to me. Any ideas?