First, I had to export my private key from the keychain as a p12 file. I tried scripting this, but was unsuccessful.
- Open keychain and select your private key
- Right-click and select "Export "
- Use a p12 file type.
Run the following openssl command to convert your password-protected p12 file to a pem. openssl will prompt for a password.
openssl pkcs12 -in your-newly-exported-p12-file.p12 -out your-newly-exported-p12-file-as-a-pem.pem -nodes
Run the following command on your pem file to generate the csr.
openssl req -new -key your-newly-exported-p12-file-as-a-pem.pem -out your-csr-to-submit-to-apple.csr
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…