Skip to content

Instantly share code, notes, and snippets.

@neuronix
Created October 30, 2015 08:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save neuronix/473a38d9fa14690b863f to your computer and use it in GitHub Desktop.
Save neuronix/473a38d9fa14690b863f to your computer and use it in GitHub Desktop.
Creating iOS certificates (.p12) for Adobe AIR on Windows with OpenSSL
:: Creating iOS certificates on windows for Adobe AIR
:: Install OpenSSL: https://www.openssl.org/source/
:: 1. Use cmd to get to openssl bin folder
:: 2. run openssl
:: 3. in openssl console: genrsa -out ios_distribution.key 2048
:: 4. in openssl console: req -new -key ios_distribution.key -out CertificateSigningRequest_distribution.certSigningRequest -subj "/emailAddress=<your@email.com>, CN=<YourCompany>, C=<CountryCode:FR>"
:: 5. repeat 4. with "_development" instead of "_distribution"
:: 6. Use both CSR requests on itunes portal to generate the certificate files (.cer)
:: 7. Use this .bat to generate the .p12 files
:: Bonus. Same process to generate push certificates
set NAME=ios_development
::set NAME=ios_distribution
::set NAME=aps_development
::set NAME=aps_production
:: CREATE PEM
set OPENSSL_CONF=C:\OpenSSL-Win64\bin\openssl.cfg
path %PATH%;C:\OpenSSL-Win64\bin
openssl x509 -in %NAME%.cer -inform DER -out %NAME%.pem -outform PEM
:: CREATE P12
set OPENSSL_CONF=C:\OpenSSL-Win64\bin\openssl.cfg
path %PATH%;C:\OpenSSL-Win64\bin
openssl pkcs12 -export -inkey %NAME%.key -in %NAME%.pem -out %NAME%.p12
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment