README.md in push_package-0.1.2 vs README.md in push_package-0.1.3

- old
+ new

@@ -1,7 +1,9 @@ # Push Package +Build Status: [![Build Status](https://travis-ci.org/SymmetricInfinity/push_package.png?branch=master)](https://travis-ci.org/SymmetricInfinity/push_package) + ## Purpose This gem provides a Ruby library and command line tool for creating a push package to be used for [Safari Push Notifications](https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html#//apple_ref/doc/uid/TP40013225-CH3-SW24). ## Features @@ -15,12 +17,10 @@ ```gem install push_package``` ## Notes: -This gem depends on `zip` being in your shell's `PATH` - You must obtain a Website Push certificate from apple which requires a iOS developer license or a Mac developer license ```ruby require 'push_package' @@ -41,9 +41,39 @@ ``` ```shell $> push_package --website-json=./website.json --iconset-path=~/project/iconset --output-dir=./ --certificate=./Certificate.p12 wrote: ./pushPackage.zip +``` + +## Development/Test Certificates + +```shell +# verify the localhost.crt +openssl verify spec/fixtures/localhost.crt + +# verify the localhost.csr +openssl req -text -noout -verify -in spec/fixtures/localhost.csr + +# verify the localhost.key +openssl rsa -in spec/fixtures/localhost.key -check -noout + +# print information about the certificate to STDOUT +openssl x509 -in spec/fixtures/localhost.crt -text -noout + +# generate a new rsa key +openssl genrsa -out spec/fixtures/localhost.key 2048 + +# generate a new csr from using an existing key +openssl req -new -sha256 -key spec/fixtures/localhost.key -out spec/fixtures/localhost.csr + +# generate a new certificate using an existing csr and private key +openssl x509 -req -days 3650 -in spec/fixtures/localhost.csr -signkey spec/fixtures/localhost.key -out spec/fixtures/localhost.crt + +# export the certificate as a p12 +# make sure to set the passphrase to 'testing' because the specs depend on it +openssl pkcs12 -export -out spec/fixtures/self-signed.p12 -inkey spec/fixtures/localhost.key -in spec/fixtures/localhost.crt + ``` ## Contributing 1. Fork it