证书服务无法使用加密密钥的指定提供程序。
Active Directory 证书服务 (AD CS) 需要 key recovery agent 证书、交换 (XCHG) 证书和密钥才能支持密钥存档。对于公钥基础设施而言,key recovery agent 证书、XCHG 证书以及创建这些证书所需的加密服务提供程序 (CSP) 是否正常工作至关重要。
使用支持密钥存档和恢复的加密服务提供程序
虽然使用管理工具无法解决加密提供程序(用来执行加密和加密证书生成相关任务的软件组件)引起的问题,但是,以下任务可提供帮助解决问题所需要的诊断信息:
确定并测试加密提供程序。
如果仍有问题且正在使用非 Microsoft 加密提供程序,请与供应商联系,以获取故障排除信息。
您还可以重置为默认的加密密钥提供程序,但同样需要吊销当前的 CA 交换证书,然后才能发布基于新提供程序的证书。
如果仍有问题且正在使用 Microsoft 提供程序,请与 Microsoft 客户服务和支持部门联系。
确定并测试加密提供程序
要执行此过程,您必须拥有管理 CA 的权限,或者您必须被委派了适当的权限。
要确定和测试正在使用的加密提供程序,请执行以下操作:
打开命令提示符窗口。
键入 certutil -getreg ca\EncryptionCSP,然后按 ENTER。
键入 certutil -csp <providername> -csptest,然后按 ENTER。使用步骤 2 中标识的提供程序替换提供程序名称。
如果您正在使用非 Microsoft 加密提供程序,请与供应商联系以获取帮助。否则,请与 Microsoft 客户服务和支持部门联系。
重置默认加密密钥提供程序
要执行此过程,您必须拥有本地管理员成员身份,或者您必须被委派了适当的权限。
在将证书颁发机构 (CA) 配置为能使用默认的 Microsoft 提供程序进行证书加密时,请将以下注册表项设置为 Microsoft Software Key Storage Provider。
注意:你可能需要吊销当前的 CA 交换证书(如果有的话),然后才能发布基于新提供程序的新证书。然后,重新启动 CA。
要修改配置的加密密钥提供程序,请执行以下操作:
警告:注册表编辑不当可能导致严重损坏你的系统。更改注册表之前,你应备份任何有价值的数据。
在托管 CA 的计算机上,单击“开始”,键入 regedit,然后按 Enter。
转到 HKLM\SYSTEM\CurrentControlSet\Services\CertSvc\Configuration\CA 名称\EncryptionCSP\Provider。
将列出的值更改为 Microsoft Software Key Storage Provider。
打开“证书颁发机构”管理单元。
在控制台树中,单击“颁发的证书”。
在详细信息窗格中,选择 CA 交换证书。
在“操作”菜单上,指向“所有任务”,然后单击“吊销证书”。
选择吊销证书的原因,调整吊销时间(如果需要),然后单击“是”。
重新启动 CA。
要确认密钥存档和恢复是否正常,请执行以下操作:
在托管 CA 的计算机上,单击“开始”,指向“管理工具”,然后单击“证书颁发机构”。
在控制台树中,右键单击证书颁发机构 (CA),然后单击“属性”。
单击“恢复代理”选项卡。
确认列出的所有 key recovery agent 证书均“有效”。
在证书模板容器中,确认已在“请求处理”选项卡中为加密证书配置了“把使用者的加密私钥存档” 选项。
打开一个用户帐户的“证书”管理单元,该用户帐户需具有根据此证书模板注册证书的权限。
在控制台树中,右键单击“个人”,指向“所有任务”,然后单击“申请新证书”,以启动“证书注册”向导。
根据加密模板注册一个证书,然后确认注册是否成功完成且没有报错。
注册完成后,打开“证书颁发机构”管理单元。
在控制台树中,单击“颁发的证书”。
找到刚才颁发的证书条目,然后将“存档的密钥”列添加到管理单元显示列表中。
确认“是”一字显示在刚才颁发的证书的“存档的密钥”列中。
Target | Microsoft.Windows.CertificateServices.CARole.2016 | ||
Category | EventCollection | ||
Enabled | True | ||
Event_ID | 86 | ||
Event Source | Microsoft-Windows-CertificationAuthority | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | High | ||
Remotable | True | ||
Alert Message |
| ||
Event Log | Application |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.Windows.EventProvider | Default |
Alert | WriteAction | System.Health.GenerateAlert | Default |
WriteToCertSvcEvents | WriteAction | Microsoft.Windows.CertificateServices.CARole.CertSvcEvents.Publisher | Default |
WriteToDB | WriteAction | Microsoft.SystemCenter.CollectEvent | Default |
<Rule ID="Microsoft.Windows.CertificateServices.CARole.2016.CertSvcEvents.86" Enabled="true" Target="CSDisc!Microsoft.Windows.CertificateServices.CARole.2016" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Application</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">86</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-CertificationAuthority</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectEvent"/>
<WriteAction ID="WriteToCertSvcEvents" TypeID="Microsoft.Windows.CertificateServices.CARole.CertSvcEvents.Publisher"/>
<WriteAction ID="Alert" TypeID="Health!System.Health.GenerateAlert">
<Priority>2</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="AlertMessageIDda66f694c2aa435dbbbc3e09e3585e3d"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/EventDisplayNumber$</SuppressionValue>
<SuppressionValue>$Data/PublisherName$</SuppressionValue>
<SuppressionValue>$Data/LoggingComputer$</SuppressionValue>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>