GoDaddy コード署名証明書を購入するために使用した .csr ファイルを生成した .key ファイルが 1 つあります。GoDaddy から .spc ファイルを 1 つ受け取りました。
次のコマンドを使用して、spc ファイルを pem にエクスポートしました。
openssl pkcs7 -inform DER -in mycert.spc -print_certs -out certs.pem
次に、certs.pem ファイルを開き、最初の 2 つの証明書を cert-chain.crt というファイルにコピーし、最後の証明書 (私のもの) を server.crt というファイルにコピーしました。
このコマンドのようにファイルに署名しようとしました:
openssl smime -sign -in a.mobileconfig -out signed_a.mobileconfig -signer cert/server.crt -inkey cert/ios_apn.key -certfile cert/cert-chain.crt -outform der -nodetach
しかし、私が得たものは次のとおりです。
unable to load certificate
11911:error:0906D06C:PEM routines:PEM_read_bio:no start line:/SourceCache/OpenSSL098/OpenSSL098-41/src/crypto/pem/pem_lib.c:648:Expecting: TRUSTED CERTIFICATE
私は何を間違っていますか?通常、提供された SPC ファイルを使用して a.mobileconfig ファイルに署名するにはどうすればよいですか?