2012年8月28日 星期二

[IOS]在 Windows 將 Apple 開發人員憑證轉換成 P12 憑證

在 Windows 將 Apple 開發人員憑證轉換成 P12 憑證 若要使用 Flash CS5 開發 iPhone 應用程式,您必須使用 P12 憑證檔案。

您將根據從 Apple 收到的 Apple iPhone 開發人員憑證檔案來產生此憑證。

1. 將您從 Apple 收到的開發人員憑證檔案轉換成 PEM 憑證檔案。從 OpenSSL bin 目錄執行以下命令列陳述式: openssl x509 -in developer_identity.cer -inform DER -out

developer_identity.pem -outform PEM

2. 如果您使用的是 Mac 電腦上的鑰匙圈專用密鑰,請將它轉換成 PEM 密鑰: openssl pkcs12 -nocerts -in mykey.p12 -out mykey.pem

3. 現在您可以根據 iPhone 開發人員憑證的密鑰及 PEM 密鑰,產生有效的 P12 檔案: openssl pkcs12 -export -inkey mykey.key -in developer_identity.pem -out iphone_dev.p12 如果您使用的是 Mac OS 鑰匙圈的密鑰,請使用上一個步驟所產生的 PEM 密鑰。

否則,請使用先前產生的 OpenSSL 金鑰 (Windows)。

重點

如果不是管理者權限
請先執行 set RANDFILE=.rnd

發生錯誤解決: error:" WARNING: can't open config file: /usr/local/ssl/openssl.cnf"

重新指定路徑 "set OPENSSL_CONF=C:\OpenSSL-Win32\bin\openssl.cfg" before trying to generate the private key

沒有留言:

張貼留言