PowerShell:New-SelfSignedCertificate:CertEnroll::CX509Enrollment::_CreateRequest:指定的标志无效。 0x80090009
PowerShell: New-SelfSignedCertificate : CertEnroll::CX509Enrollment::_CreateRequest: Invalid flags specified. 0x80090009
我正在尝试创建一个证书,稍后我将使用它来签署开发中的其他证书。我正在使用 Powershell New-SelfSignedCertificate cmdlet。
命令如下:
New-SelfSignedCertificate -CertStoreLocation Cert:\CurrentUser\My -Container In4mRootCATest* -DnsName in4monline-test.com -FriendlyName "In4m Test Root CA Cert" -KeyExportPolicy Exportable -KeyFriendlyName "In4m Test Root CA Cert Private Key" -KeyLocation "C:\scratch" -KeyProtection None -KeySpec Signature -KeyUsage CertSign,CRLSign,DigitalSignature -KeyUsageProperty All -NotAfter (Get-Date).AddMonths(72) -Provider "Microsoft Base DSS Cryptographic Provider" -Type Custom
我得到的错误是:
New-SelfSignedCertificate : CertEnroll::CX509Enrollment::_CreateRequest: Invalid flags specified. 0x80090009 (-2146893815 NTE_BAD_FLAGS)
At line:1 char:1
+ New-SelfSignedCertificate -CertStoreLocation Cert:\CurrentUser\My -Co ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-SelfSignedCertificate], Exception
+ FullyQualifiedErrorId : System.Exception,Microsoft.CertificateServices.Commands.NewSelfSignedCertificateCommand
任何人都可以帮助我了解我可能 combining/submitting 错误的价值观吗?
我在 Windows 10.
感谢帮助。
我不是证书方面的专家,但这可能会推动您前进。
我建议您尝试使用列表中的其他提供商:
certutil -csplist
客户端 CSP 不允许导出密钥
对于生成私钥并将私钥发送给 CA 的客户端注册过程,生成密钥时必须将密钥标记为可导出。如果证书模板未设置为允许密钥导出,或者如果 third-party CSP(如果适用)不支持可导出密钥,注册将失败并且注册向导将 return 错误提示密钥不是可出口。 Third-party 发生这种情况时,CSP 可能会报告各种错误,例如“灾难性故障”。如果 Windows 2000 或 Windows Millennium Edition 客户端使用密钥存档执行注册,如果密钥未标记为导出,则可能会出现以下错误。
0x80090009 - NTE_BAD_FLAGS
注意:如果 CSP 支持密钥归档的 one-time 标志,称为 (CRYPT_ARCHIVABLE),则不需要密钥导出标志。 Microsoft 默认软件 CSP 支持此标志。但是,Windows 2000 和 Windows Millennium Edition 客户端不支持此标志,并且必须允许导出密钥以进行注册以使用密钥存档。
删除 -provider 参数,然后使用 Certificates MMC snap-in 查看证书是否是您需要的。
我正在尝试创建一个证书,稍后我将使用它来签署开发中的其他证书。我正在使用 Powershell New-SelfSignedCertificate cmdlet。
命令如下:
New-SelfSignedCertificate -CertStoreLocation Cert:\CurrentUser\My -Container In4mRootCATest* -DnsName in4monline-test.com -FriendlyName "In4m Test Root CA Cert" -KeyExportPolicy Exportable -KeyFriendlyName "In4m Test Root CA Cert Private Key" -KeyLocation "C:\scratch" -KeyProtection None -KeySpec Signature -KeyUsage CertSign,CRLSign,DigitalSignature -KeyUsageProperty All -NotAfter (Get-Date).AddMonths(72) -Provider "Microsoft Base DSS Cryptographic Provider" -Type Custom
我得到的错误是:
New-SelfSignedCertificate : CertEnroll::CX509Enrollment::_CreateRequest: Invalid flags specified. 0x80090009 (-2146893815 NTE_BAD_FLAGS)
At line:1 char:1
+ New-SelfSignedCertificate -CertStoreLocation Cert:\CurrentUser\My -Co ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-SelfSignedCertificate], Exception
+ FullyQualifiedErrorId : System.Exception,Microsoft.CertificateServices.Commands.NewSelfSignedCertificateCommand
任何人都可以帮助我了解我可能 combining/submitting 错误的价值观吗?
我在 Windows 10.
感谢帮助。
我不是证书方面的专家,但这可能会推动您前进。 我建议您尝试使用列表中的其他提供商:
certutil -csplist
客户端 CSP 不允许导出密钥 对于生成私钥并将私钥发送给 CA 的客户端注册过程,生成密钥时必须将密钥标记为可导出。如果证书模板未设置为允许密钥导出,或者如果 third-party CSP(如果适用)不支持可导出密钥,注册将失败并且注册向导将 return 错误提示密钥不是可出口。 Third-party 发生这种情况时,CSP 可能会报告各种错误,例如“灾难性故障”。如果 Windows 2000 或 Windows Millennium Edition 客户端使用密钥存档执行注册,如果密钥未标记为导出,则可能会出现以下错误。 0x80090009 - NTE_BAD_FLAGS 注意:如果 CSP 支持密钥归档的 one-time 标志,称为 (CRYPT_ARCHIVABLE),则不需要密钥导出标志。 Microsoft 默认软件 CSP 支持此标志。但是,Windows 2000 和 Windows Millennium Edition 客户端不支持此标志,并且必须允许导出密钥以进行注册以使用密钥存档。
删除 -provider 参数,然后使用 Certificates MMC snap-in 查看证书是否是您需要的。