Support directly passing key and certificate rather than loading from file #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We make multiple connections for a couple different iOS applications, and so we store our keys in the database rather than on the filesystem. This change lets you specify a DER-encoded key and certificate as part of
#apns_connection
's options, mimickingssl:connect
's options.Another way to do this would be to directly support setting
ssl:connect
options in#apns_connection
. If you prefer this, let me know!This fixes #26.
I've left this as working commits for easier review, but I can squash prior to a merge.
If you plan to merge this, I'd like to add a snippet to the README about how to use Erlang's
public_key
module to decode keys into the proper format for use with these new options.