4

GoDaddyコード署名証明書の購入に使用した.csrファイルを生成した.keyファイルが1つあります。 GoDaddyから私は1つの.spcファイルを受け取りました。SPCファイルでLinux上で署名するファイル

私は、次のコマンドを使用してPEMにSPCファイルにエクスポート:私はその後、certs.pemファイルを開いて、CERT-chain.crt、最後の1というファイルに最初の2つの証明書をコピーし

openssl pkcs7 -inform DER -in mycert.spc -print_certs -out certs.pem 

を(これは私のものです)を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ファイルに通常どのように署名する必要がありますか?

答えて

1

証明書はDER形式ですが、opensslはPEM形式を想定しています。コマンドに-inform derを追加する必要があります。

openssl smime -sign -in a.mobileconfig -out signed_a.mobileconfig -signer cert/server.crt -inkey cert/ios_apn.key -certfile cert/cert-chain.crt -inform der -outform der -nodetach 
関連する問題