I was browsing through adobe sites and forums to find out how can I create a certificate for iOS development on windows. I tried OpenSSL on widnows but it always failed to find the config file.
So here is what I did –
- Install Cygwin – http://cygwin.com/install.html
Cygwin doesnt by default install OpenSSL so during installation, select the OpenSSL package for installation under ‘Net’ packages.
- After installation, run Cygwin Terminal.
on Terminal type ‘openssl’ and enter, prompt should change to OpenSSL –
3. Type in below command to create CSR file. After entering that command, it shall ask you to enter some information and a password at the end. Remember that password, you would need it. At then you should have a key and csr file in c:/test folder.
OpenSSL> req -nodes -newkey rsa:2048 -keyout /cygdrive/C/test/mms.key -out /cygdrive/C/test/mms.csr
Generating a 2048 bit RSA private key
writing new private key to ‘/cygdrive/C/mms.key’
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:State
Locality Name (eg, city) :City
Organization Name (eg, company) [Internet Widgits Pty Ltd]:My Company
Organizational Unit Name (eg, section) :Org
Common Name (e.g. server FQDN or YOUR name) :CN
Email Address :email@example.com
Please enter the following ‘extra’ attributes
to be sent with your certificate request
A challenge password :test
An optional company name :anything
Upload the .csr file to iOS provisioning portal>Certificates – https://developer.apple.com/ios/manage/certificates/team/
Once you get have the certificate approved and available for download, get it. Copy that .cer file to c:/test folder.
Go to Cygwin>OpenSSL prompt and enter below command –
x509 -in /cygdrive/C/test/ios_development.cer -inform DER -out /cygdrive/C/test/ios_development.pem -outform PEM
- To create .p12 file run below command on OpenSSL prompt –
openssl pkcs12 -export -inkey /cygdrive/C/test/mms.key -in /cygdrive/C/test/ios_development.pem -out /cygdrive/C/test/mms.p12
- Check your c:/test folder, you should have your certificate ready for use.