2014-09-29 35 views
1

我希望使用下面的命令簽署.mobileconfig文件:提取憑證部分簽署文件,OpenSSL的

openssl smime \ 
-sign \ 
-signer your-cert.pem \ 
-inkey your-priv-key.pem \ 
-certfile TheCertChain.pem \ 
-nodetach \ 
-outform der \ 
-in ConfigProfile.mobileconfig \ 
-out ConfigProfile_signed.mobileconfig 

我有一個請求,並安裝在我的機器上的SSL證書,代碼簽名在我的機器上請求並安裝的證書。

現在的證書,我應該使用(代碼簽名或SSL?),以及如何得到的your-cert.pemyour-priv-key.pemTheCertChain.pem文件保持?

再次訪問GoDaddy只是給了我一個.pem文件,我不知道哪一個是。

運行從GoDaddy的的.PEM openssl x509 -in godaddy.pem -inform pem -noout -text給出如下:

Certificate: 
    Data: 
     Version: 3 (0x2) 
     Serial Number: 0 (0x0) 
    Signature Algorithm: sha1WithRSAEncryption 
     Issuer: C=US, O=The Go Daddy Group, Inc., OU=Go Daddy Class 2 Certification Authority 
     Validity 
      Not Before: Jun 29 17:06:20 2004 GMT 
      Not After : Jun 29 17:06:20 2034 GMT 
     Subject: C=US, O=The Go Daddy Group, Inc., OU=Go Daddy Class 2 Certification Authority 
     Subject Public Key Info: 
      Public Key Algorithm: rsaEncryption 
       Public-Key: (2048 bit) 
       Modulus: 
        00:de:9d:d7:ea:57:18:49:a1:5b:eb:d7:5f:48:86: 
        ea:be:dd:ff:e4:ef:67:1c:f4:65:68:b3:57:71:a0: 
        ****REMOVED FOR BREVITY**** 
        58:c6:44:7b:0a:3e:62:28:5f:ba:41:07:53:58:cf: 
        11:7e:38:74:c5:f8:ff:b5:69:90:8f:84:74:ea:97: 
        1b:af 
       Exponent: 3 (0x3) 
     X509v3 extensions: 
      X509v3 Subject Key Identifier: 
       D2:C4:****REMOVED FOR BREVITY****:A8:6A:D4:E3 
      X509v3 Authority Key Identifier: 
       keyid:D2:C4:****REMOVED FOR BREVITY****D:A8:6A:D4:E3 
       DirName:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority 
       serial:00 

      X509v3 Basic Constraints: 
       CA:TRUE 
    Signature Algorithm: sha1WithRSAEncryption 
     32:4b:f3:b2:ca:3e:91:fc:12:c6:a1:07:8c:8e:77:a0:33:06: 
     14:5c:90:1e:18:f7:08:a6:3d:0a:19:f9:87:80:11:6e:69:e4: 
     96:17:30:ff:34:91:63:72:38:ee:cc:1c:01:a3:1d:94:28:a4: 
     ****REMOVED FOR BREVITY**** 
     10:43:a6:a5:9e:0a:d5:95:62:9a:0d:cf:88:82:c5:32:0c:e4: 
     2b:9f:45:e6:0d:9f:28:9c:b1:b9:2a:5a:57:ad:37:0f:af:1d: 
     7f:db:bd:9f 
+0

什麼是你的編程問題上.mobileconfig? – user93353 2014-09-29 15:55:29

+0

運行命令'openssl x509 -in godaddy.pem -inform pem -noout -text' - 這會告訴你GoDaddy包含在他們提供的.pem文件中。將結果與私人指紋混淆發佈,或更新您的答案並提供更多詳細信息。 – ice13berg 2014-09-30 04:34:32

+0

我已經發布了這個。我運行什麼命令來提取'your-cert.pem'和'your-priv-key.pem'? – gunwin 2014-09-30 11:15:57

回答