Apple Push Certs
Helps with the process of getting a certificate for the Apple Push Notification Service.
This gem:
- Creates private keys
- Creates CSRs
- Signs CSRs
- Submits signed CSRs to Apple
- Retrieves push certificates from Apple
Installation
Add this line to your application's Gemfile:
gem 'apple_push_certs'
And then execute:
$ bundle
Or install it yourself as:
$ gem install apple_push_certs
Usage
Create a New Certificate
include 'ApplePushCerts' # for the sake of terseness
key = Customer::Key.new
csr = Customer::CSR.new key
signed_csr = SignedCSR.new 'my_signing_cert.p12', 'my_cert_password', csr
certificate = Certificate.new signed_csr, 'apple_id', 'password'
### Renew an Existing Certificate
key = [existing key]
certificate = [existing certificate] # should be of type OpenSSL::X509::Certificate
csr = Customer::CSR.new key
signed_csr = SignedCSR.new 'my_signing_cert.p12', 'my_cert_password', csr
certificate = Certificate.renew certificate, signed_csr, 'apple_id', 'password'