So, I thought a lot about how to create a p12 file for iPhone development, and I think that I am doing exactly as I expect, but in the last step I get some errors that are more or less impossible to decrypt.
I am running Windows 7 and these are the following steps:
1) Create a private key. I do this by executing this command (cmd opens in admin mode):
openssl genrsa -out mykey.key 2048
2) Create a CSR file
openssl req -new -key mykey.key -out developer_identify.csr
3) Upload the csr file to the iPhone dev website. Here I do the following:
- Click "Identifiers" β "Application Identifiers", select the correct application identifier, click "Edit", click "Create Certificate", click "Continue", select the CSR file created above and continue. Wait until the site tells me everything is OK, and then upload the file * aps_development.cer *.
4) Create a PEM file:
openssl x509 -in aps_development.cer -inform DER -out developer_identity.pem -outform PEM
5) And finally create a p12 file ( and this fails ):
openssl pkcs12 -export -inkey mykey.key -in developer_identity.pem -out iphone_dev.p12
Exit after the last command:
Loading 'screen' into random state - done Enter Export Password: Verifying - Enter Export Password: 8216:error:060740A0:lib(6):func(116):reason(160):NA:0: 8216:error:23077073:lib(35):func(119):reason(115):NA:0: 8216:error:2306C067:lib(35):func(108):reason(103):NA:0: 8216:error:23073067:lib(35):func(115):reason(103):NA:0:
The p12 file is 0 bytes.
The PEM file looks good, starts with
-----BEGIN CERTIFICATE----- then a lot of jibberish and then ends with -----END CERTIFICATE-----
source share