【发布时间】:2011-03-01 15:12:07
【问题描述】:
对于我的应用程序,我需要生成一个 2048 位的证书。是否可以使用“makecert.exe”工具生成?
如果没有,可以使用哪个工具生成证书?
【问题讨论】:
-
您购买证书。它的成本超过 1024 位。
对于我的应用程序,我需要生成一个 2048 位的证书。是否可以使用“makecert.exe”工具生成?
如果没有,可以使用哪个工具生成证书?
【问题讨论】:
【讨论】:
是的,我创建了一个配置文件(在 MS documentation 之后)来完成您可以通过以下命令使用的工作(假设 conf 文件名为 config.inf):
certreq -New config.inf csr_file
这是配置文件的内容(您必须根据需要进行调整):
; /!\ DON'T MODIFY THIS SECTION
[Version]
Signature = "$Windows NT$"
; Here are the TUNABLE THINGS
[NewRequest]
; Edit the subject to match your needs
Subject = "C=FR,ST=Ile De France,L=Paris,O=MyGroup,OU=MyTeam,CN=MySite"
; Indicate if the private key is exportable or not
Exportable = TRUE
; Minimum key length : 2048 bits
KeyLength = 2048
; Key Usages
KeyUsage = 0xe0
; Indicates if the certificate is stored in the machine store or not
MachineKeySet = TRUE
; Format of the output CSR file, you should not have to change that
RequestType = PKCS10
; Specify the provider used to generate the private/public key pair, you can
; list all the available providers by typing the following command :
; `certutil -csplist`
ProviderName = "Microsoft Enhanced RSA and AES Cryptographic Provider"
ProviderType = 24
然后,当您取回证书时,您只需使用以下命令导入它:
certreq -Accept crt_file
希望这会有所帮助:)
【讨论】:
我使用了带有 2048 位选项的 Makecert。它工作正常。我没有在 MSDN 网站上说早先的声明。但它工作正常。
【讨论】: