How to specifiy key size in the CertCreateSelfSign

2020-07-22 18:13发布

问题:

I am using the function CertCreateSelfSignCertificate to generate a certificate. I need to specify the key size to be 2048. I do not see how to provide this parameter.

回答1:

Look at the description for the dwFlags argument as described in CryptGenKey. That should permit you to select the key length.