Advertisement
Guest User

Untitled

a guest
Feb 5th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. Development Phase:
  2.  
  3. Step 1: Create Certificate .pem from Certificate .p12
  4. Command: openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
  5.  
  6. Step 2: Create Key .pem from Key .p12
  7. Command : openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12
  8.  
  9. Step 3: Optional (If you want to remove pass phrase asked in second step)
  10. Command : openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem
  11.  
  12. Step 4: Now we have to merge the Key .pem and Certificate .pem to get Development .pem needed for Push Notifications in Development Phase of App
  13. Command : cat apns-dev-cert.pem apns-dev-key-noenc.pem > apns-dev.pem (If 3rd step is performed )
  14.  
  15. Command : cat apns-dev-cert.pem apns-dev-key.pem > apns-dev.pem (if not)
  16.  
  17. Step 5: Check certificate validity and connectivity to APNS
  18. Command: openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert apns-dev-cert.pem -key apns-dev-key.pem (If 3rd step is not performed )
  19. Command: openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert apns-dev-cert.pem -key apns-dev-key-noenc.pem (If performed )
  20.  
  21. Production Phase:
  22.  
  23. Step 1: Create Certificate .pem from Certificate .p12
  24. Command: openssl pkcs12 -clcerts -nokeys -out apns-pro-cert.pem -in apns-pro-cert.p12
  25.  
  26. Step 2: Create Key .pem from Key .p12
  27. Command : openssl pkcs12 -nocerts -out apns-pro-key.pem -in apns-pro-key.p12
  28.  
  29. Step 3: Optional (If you want to remove pass phrase asked in second step)
  30. Command : openssl rsa -in apns-pro-key.pem -out apns-pro-key-noenc.pem
  31.  
  32. Step 4: Now we have to merge the Key .pem and Certificate .pem to get Production .pem needed for Push Notifications in Production Phase of App
  33. Command : cat apns-pro-cert.pem apns-pro-key-noenc.pem > apns-pro.pem (If 3rd step is performed ) Command : cat apns-pro-cert.pem apns-pro-key.pem > apns-pro.pem (if not)
  34.  
  35. Step 5: Check certificate validity and connectivity to APNS
  36. Command: openssl s_client -connect gateway.push.apple.com:2195 -cert apns-pro-cert.pem -key apns-pro-key.pem (If 3rd step is not performed )
  37. Command: openssl s_client -connect gateway.push.apple.com:2195 -cert apns-pro-cert.pem -key apns-pro-key-noenc.pem (If performed )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement