One set of functions uses the signpass tool included in Apple's Passbook
Support Materials to sign the pass. This uses the system keychain directly, but
works on OS X only.

The other set of functions uses OpenSSL instead, in this case you need to export
your certificate using the process described in the OpenSSL section of this document.

If you want to use this module with an existing .pkpass file, you can import it
using the function loadPass. Please note that you still need to provide the
assets in a separate directory, loadPass only parses the pass.json file.

Using these function is very simple, assuming you have created a Pass called
myPass and you have the related assets (e.g. the logo.png and icon.png files)
stored in a folder named myPass/.

You want the signed pass to be stored in a folder called passes/. You call
signpass like this:

(path, passId) <- signpass "myPass" "passes" myPass

You will find the pass at path with the filename passId.pkpass. Using the
types from Passbook.Types ensures that passes are generated correctly.

Please note that an icon.png file must be present in your asset folder,
otherwise the generated pass will not work. This is not checked by this module.

Refer to Apple's Passbook documentation at https://developer.apple.com/passbook/
for more information or to retrieve the signpass tool which is included in the
Passbook Support Materials. (iOS Developer Membership necessary)

Sign using signpass

These functions sign a Pass using the signpass tool provided by Apple in the
Passbook Support Materials. You can find those at https://developer.apple.com/passbook/
however, an iOS Developer Membership is necessary for the download.

The signpass utility needs access to your keychain. OS X will prompt you for this the first
time you run the tool.

Please make sure that the signpass tool is within your $PATH. These functions work on OS X
only.

Works like signpass, except for the fourth argument which is a
modifier function that updates the pass with the generated UUID.
This is useful for cases where you want to store the UUID in the barcode
or some other field on the pass as well.

Sign using OpenSSL

These functions sign a Pass using OpenSSL. They work on operating systems
other than OS X as well. To use these you need to export your certificate
from the keychain. Assuming you have saved the certificatea as cert.p12
, the conversion works like this:

Works like signOpen, except for the fourth argument which is a
modifier function that updates the pass with the generated UUID.
This is useful for cases where you want to store the UUID in the barcode
or some other field on the pass as well.