我已经在2008 R2上build立了一个Microsoft独立CA作为根CA. 我正在尝试设置从属企业CA. 我生成了证书请求,并将其提交给根CA. 然后,我运行以下命令将到期date设置为20年(请求标识为5):
certutil -setattributes 5 "ValidityPeriod:Years\nValidityPeriodUnits:20"
然后,我批准了这个请求,但是失败了。 请求状态代码是:
The specified time is invalid. 0x8007076d (WIN32: 1901)
请求处理消息是:
Denied by Policy Module 0x8007076d, The requested validity period is invalid. Confirm that the validity period or expiration data and time specified in the request does not extend beyond the validity period of the CA certificate, the certificate template, and the CA. The validity period of the CA can be verified by running the following commands: certutil -getreg ca\validityPeriod & certutil -getreg ca\ValidityPeriodUnits
CA证书有效期为40年(2052年到期)。 模板条件不适用,因为这是一个独立的CA. 这些命令的结果分别是年和1。
看来我需要更改CA的有效期和有效期单元。 但是,我想保持一年的请求默认到期。 有没有办法设置最大和默认过期,或者我将不得不改变它,颁发证书,然后将其更改回来?
根据Windows 2000文档 :
All certificates that the stand-alone CA issues have the lifetime specified by the values of the ValidityPeriod and ValidityPeriodUnits registry entries. Therefore, if you want to issue certificates with different lifetimes, you must deploy either enterprise CAs, multiple stand-alone CAs, or third-party CAs.
根据social.technet.microsoft.com最近的一篇文章 ,这似乎仍然是有效的。
我结束了更改registry值,颁发证书,然后将其更改回来。