如何使X.509证书? [英] How to make X.509 certificate?

查看:299
本文介绍了如何使X.509证书?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要创建X.509证书。我使用makecert.exe来做这个。我使用这个命令来生成我的X.509证书

I am trying to make a X.509 certificate. I am using makecert.exe to make this. I use this command to make my X.509 certificate

 makecert.exe -sr LocalMachine -ss My -a sha1 -n CN=MyServerCert -sky exchange –pe

但我不知道有X.509证书存储。

我需要在我的c#代码中使用此X.509证书。代码是:

But i don`t know there X.509 certificate is storeing.
I need to use this X.509 certificate in my c# code. The code is :

  host.Credentials.ServiceCertificate.Certificate = new X509Certificate2("MyServerCert.p12", "password");

但我不知道是什么是密码,它抛出这个异常系统找不到文件指定。

But i don`t know what is password and it throw this exception "The system cannot find the file specified."

推荐答案

我总是使用PluralSight的SelfCert工具。您可以下载这里。同样的页面也给出了用法和代码示例。

I always use the SelfCert tool from PluralSight. You can download it here. The same pages also give usage and code examples.

很好的免费工具,不能没有它。

Great free tool, can't do without it.

这篇关于如何使X.509证书?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆