You have a private key that corresponds to this certificate but CryptAcquireCertificatePrivateKey failed.

You have a private key that corresponds to this certificate but CryptAcquireCertificatePrivateKey failed.

https://github.com/jexuswebserver/JexusManager/blob/0d4a33d5247557f103887a7ef3e4403cf48627be/JexusManager/Features/Main/SslDiagDialog.cs#L207

 

https://github.com/microsoft/service-fabric/issues/773

It appears there may be 2 issues here:

  • the certificate's private key is not ACL'd to NetworkService; to fix this, please open the Management Console (start -> run -> mmc), navigate to 'Local Computer Certificates' (file -> add snap-in -> certificates, local computer) and examine the private key access list (right click on the certificate, 'All tasks' -> Manage private key..). If NetworkService is not listed: Add -> %computername%\Network Service -> 'check', followed by ok. (You may need to replace %computername% with the actual host name.)

  • the certificate is issued by an unsupported provider. The error (0x80090014/NTE_BAD_PROV_TYPE) indicates that the certificate was issued by a CNG key provider, which the SF runtime does not currently support. Note that ACLing errors are not fatal, and should not be the cause of the cluster's failure to start.

To confirm that is the case, please run the following, from a PowerShell prompt:
cd Cert:\LocalMachine\My
certutil -v -store my | findstr -i provider

If the output contains something like this:
Provider = Microsoft Software Key Storage Provider
then indeed this is a CNG certificate (issued with a Key Storage Provider).

I presume the certificate was created with the New-SelfSignedCertificate PowerShell cmdlet, which, unless otherwise specified, will use a CNG provider. If that is the case, and it is possible for you to create another certificate to be used for this cluster, you may try the following:

New-SelfSignedCertificate -NotBefore '' -NotAfter '' -DnsName -CertStoreLocation Cert:\LocalMachine\My -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -KeyExportPolicy ExportableEncrypted -Type Custom -Subject ""

Note this is just an example - the complete list of Crypto API Cryptographic Service Providers can be found here.

We are addressing this issue in an upcoming release.
Thanks.

 

作者:Chuck Lu    GitHub    
posted @   ChuckLu  阅读(227)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2019-09-08 多态的实际使用
2017-09-08 查看数据库的表被谁锁住了,以及如何解锁
2017-09-08 WinRar 设置默认的压缩格式为zip
点击右上角即可分享
微信分享提示