How to test the APNS p12 certificate environments ruby? -


i'm developing service sending push notifications, can't tell if uploaded apns certificate p12 sandbox or production. test in order avoid human error when uploading certificate.

the common name of issued certificate tells if it's sandbox or production.

example production: apple production ios push services: your.app.identifier

my ruby skills bit rusty should it:

require 'openssl' raw_cert = openssl::pkcs12.new(file.read(path_to_your_cert), your_pwd) # if want read .p12 cert  cert = openssl::x509::certificate.new(raw_cert) cert.subject.start_with?("apple production ios") 

see here: http://ruby-doc.org/stdlib-2.0.0/libdoc/openssl/rdoc/openssl/x509/certificate.html


Comments

Popular posts from this blog

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

yii2 - Yii 2 Running a Cron in the basic template -

java - Println error using enumate paramer and import error -