Created
November 14, 2014 09:33
-
-
Save hackugyo/033140560b4cb3fdee53 to your computer and use it in GitHub Desktop.
p12_to_pem
openssl pkcs12 -in cert_and_key.p12 -out aps_developer_from_cert_and_key.pem -nodes -clcertsコマンドがうまく動かないので作った(いまやったらふつうに動いた。??)
cert_and_key.p12ファイルは、「キーチェーンアクセス」アプリから秘密鍵・証明書を同時選択(エクスパンドして両方見えている状態でShift+クリック)した状態で右クリックし、「2個を書き出す…」を選択して生成する。このときお好きなパスワードを入れて、下記のスクリプトのYOUR_PASSWORDとして使う
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| YOUR_PASSWORD="" | |
| expect -c " | |
| set timeout 20 | |
| spawn openssl pkcs12 -in cert_and_key.p12 -out aps_developer_from_cert_and_key.pem -nodes -clcerts | |
| expect Password: | |
| send \"$YOUR_PASSWORD\r\" | |
| interact | |
| " | |
| echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment