对于我的应用程序,我需要生成一个2048位的证书。是否可以使用'makecert.exe'工具生成?
如果没有,可以使用哪个工具生成证书?
答案 0 :(得分:1)
答案 1 :(得分:1)
是的,我创建了一个配置文件(在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
希望这会有所帮助:)
答案 2 :(得分:0)
我使用了20个位选项的Makecert。它工作正常。我不是早先在MSDN网站上发表的声明。但它运作正常。