个人信息交换 (.pfx) 文件Personal Information Exchange (.pfx) Files

若要使用的版本签名,软件发行者证书 (SPC) 和其专用和公共密钥,必须存储在个人信息交换 (。pfx) 文件。To be used for release signing, a Software Publisher Certificate (SPC), and its private and public keys, must be stored in a Personal Information Exchange (.pfx) file. 但是,某些证书颁发机构 (Ca) 使用不同的文件格式来存储此数据。However, some certificate authorities (CAs) use different file formats to store this data. 例如,某些 Ca 将证书的私钥存储在私钥 (。pvk) 文件和存储证书和公钥 .spc.cer文件。For example, some CAs store the certificate's private key in a Private Key (.pvk) file and store the certificate and public key in a .spc or .cer file.

如果 CA 颁发 .spc中以非及其密钥 .pfx文件,您必须转换和存储中的文件 .pfx文件才可以为版本签名中使用。If the CA issued an .spc and its keys in non-.pfx files, you must convert and store the files in a .pfx file before they can be used for release-signing. Pvk2Pfx 工具用于执行此转换。The Pvk2Pfx tool is used to perform this conversion.

下面的命令行示例将转换 .pvk名为的文件abc.pvk和一个 .spc名为abc.spc.pfx名为的文件abc.pfx:The following command-line example converts a .pvk file that is named abc.pvk and a .spc that is named abc.spc into a .pfx file that is named abc.pfx:

Pvk2Pfx -pvk abc.pvk -pi pvkpassword -spc abc.spc -pfx abc.pfx -po pfxpassword -f

其中:Where:

  • -Pvk选项指定 .pvk文件 (abc.pvk)。The -pvk option specifies a .pvk file (abc.pvk).

  • -Pi选项指定的密码。pvk文件 (pvkpassword)。The -pi option specifies the password for the .pvk file (pvkpassword).

  • -Spc选项指定的名称和包含的证书的 SPC 文件扩展名。The -spc option specifies the name and extension of the SPC file that contains the certificate. 该文件可以是 .spc文件或 .cer文件。The file can be either an .spc file or a .cer file. 在此示例中,证书和公钥位于abc.spc文件。In this example, the certificate and public key are in the abc.spc file.

  • -Pfx选项指定的名称 .pfx文件 (abc.pfx)。The -pfx option specifies the name of the .pfx file (abc.pfx). 如果未指定此选项,Pvk2Pfx 打开导出的向导,并忽略-采购订单和-f 自变量。If this option is not specified, Pvk2Pfx opens an Export Wizard and ignores the -po and -f arguments.

  • Po选项指定的密码 .pfx文件 (pfxpassword)。The -po option specifies a password for the .pfx file (pfxpassword). 如果未指定此选项,指定 .pfx文件的分配相同的密码与指定关联 .pvk文件。If this option is not specified, the specified .pfx file is assigned the same password that is associated with the specified .pvk file.

  • -F选项配置 Pvk2Pfx 要替换的现有 .pfx文件如果存在。The -f option configures Pvk2Pfx to replace an existing .pfx file if one exists.

有关 SPCs 和他们管理的详细信息,请参阅软件发布者证书 (SPC)For more information about SPCs and their management, see Software Publisher Certificate (SPC).