使用 spc 文件签署 adobe air 应用程序

发布于 2024-10-08 20:48:46 字数 172 浏览 5 评论 0原文

我最近从 GoDaddy 购买了数字证书来签署 Adob​​e Air 应用程序。 GoDaddy,可能还有其他一些 CA,以 SPC 文件形式提供证书。但是,大多数有关编译和签署 Air 应用程序的信息都假设您有一个 p12 文件。我花了一些时间弄清楚如何处理这个问题,并认为与 SO 社区分享该过程会很好。我很快就会发布答案。

I recently purchased a digital certificate from GoDaddy to sign an adobe air application. GoDaddy, and probably some of the other CAs out there, deliver their certificates as SPC files. However, most of the information about compiling and signing an air application assumes you have a p12 file. I spent a while figuring out how to deal with this issue and thought it'd be good to share the process with the SO community. I will post an answer shortly.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

弃爱 2024-10-15 20:48:46

提出正确方法的关键是理解 p12 文件是一个密钥库 - 而不仅仅是一个证书。密钥库包含密钥和证书。签署 adobe air 应用程序时,您需要提供密钥库而不仅仅是证书。那么,让我从头开始。

第 1 步:创建密钥库

keytool -genkey -alias codesigncert -keypass <yourkeypwd> -keyalg RSA -keysize 2048 -dname "CN=displayname,O=companyname,C=US,ST=state,L=city" -keystore codesignstore -storepass <yourstorepwd>

第 2 步:创建证书请求

keytool -certreq -v -alias codesigncert -file mycsr.pem -keystore codesignstore

第 3 步:使用之前创建的 CSR 从 CA 购买证书步。就我而言,我将证书下载为 SPC 文件。

第 4 步:将证书添加到您的密钥库

keytool -import -keystore codesignstore -storepass <yourstorepwd> -alias codesigncert -file mycert.spc

第 5 步:当前您的密钥库是 java 密钥库 (JKS)。将其转换为 PKCS12

keytool -importkeystore -srckeystore codesignstore -srcstoretype JKS -deststoretype PKCS12 -destkeystore codesignstore.p12

第 6 步:签署您的应用程序

adt -package -storetype pkcs12 -keystore codesignstore.p12 -storepass <yourstorepwd> -keypass <yourkeypwd> <name of output file> application.xml <path to root dir>

我认为也可以跳过第 5 步并使用 JKS 密钥库执行第 6 步。然而,我并没有确认这是否有效。

The key to coming up with the correct method was understanding that a p12 file is a keystore - not just a certificate. A keystore contains the key and the certificate. When signing an adobe air app, you need to provide a keystore and not just a certificate. So, let me begin from the top.

Step 1: Create a keystore

keytool -genkey -alias codesigncert -keypass <yourkeypwd> -keyalg RSA -keysize 2048 -dname "CN=displayname,O=companyname,C=US,ST=state,L=city" -keystore codesignstore -storepass <yourstorepwd>

Step 2: Create a certificate request

keytool -certreq -v -alias codesigncert -file mycsr.pem -keystore codesignstore

Step 3: Purchase a certificate from a CA using the CSR created in the previous step. In my case, I downloaded the certificate as an SPC file.

Step 4: Add the certificate to your keystore

keytool -import -keystore codesignstore -storepass <yourstorepwd> -alias codesigncert -file mycert.spc

Step 5: Currently your keystore is a java key store (JKS). Convert this to PKCS12

keytool -importkeystore -srckeystore codesignstore -srcstoretype JKS -deststoretype PKCS12 -destkeystore codesignstore.p12

Step 6: Sign your app

adt -package -storetype pkcs12 -keystore codesignstore.p12 -storepass <yourstorepwd> -keypass <yourkeypwd> <name of output file> application.xml <path to root dir>

I think it's probably also possible to skip step 5 and perform step 6 using the JKS keystore. I didn't confirm that this works, however.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文