ITPub博客

首页 > Linux操作系统 > Linux操作系统 > The certificate must have a private key that is capable of key exchange

The certificate must have a private key that is capable of key exchange

原创 Linux操作系统 作者:kevin_1229 时间:2014-12-04 16:05:29 0 删除 编辑

To the two above: Use the FindPrivateKey utility located in the WCF samples to find the location of the private key, and then set the permissions accordingly.

I spent many hours today while having the same problem, and I came up with the following solution

To install a self signed certificate

makecert.exe -sr LocalMachine -ss MY -a sha1 -n CN=%SERVER_NAME% -sky exchange -pe

certmgr.exe -add -r LocalMachine -s My -c -n %SERVER_NAME% -r LocalMachine -s TrustedPeople

To use the FindKeyUtility

FindPrivateKey.exe TrustedPeople LocalMachine Private key directory: C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys Private key file name: 756e9ecb7bb8ed83bf80031497479997_8a4ee4f0-1f8d-4d2e-b1bf-fff1d5b15e61

And then, you can go to the specified folder and change the permissions...

Moreover, I needed to set this in the client's config file

   

       

         

           

             

                 

             

           

         

       

     

and add this to the endpoint configuration

behaviorConfiguration="ClientCertificateBehavior"

Finally, pay attention to the

                   

               

element, in the client.

The dns value must much the one in the certificate.

Good luck!!

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/557324/viewspace-1356584/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-08-28

  • 博文量
    22
  • 访问量
    44043