如何自动生成数字证书啊
想实现用户注册后根据注册名自动生成数字证书,如何实现啊?我用的是windows 2000 server自带的CA,是不是可以通过代码填写网页并提交然后得到证书呢?
请大虾们指点,成功解决后可以再多给分 --------------------编程问答-------------------- 没用过,帮你顶一顶,周末了,可能很多人都着急回家啊! --------------------编程问答-------------------- 想学习一下,我也不会 --------------------编程问答-------------------- 周末了!休息了 --------------------编程问答-------------------- mark --------------------编程问答-------------------- 别沉了啊 --------------------编程问答-------------------- 我也想要实现这个功能,我用的是win2003 --------------------编程问答-------------------- 继续顶,大侠帮忙啊 --------------------编程问答-------------------- 好像可以通过证书申请文本来获得证书
另外,也可能通过csp或者capi可以生成证书 --------------------编程问答-------------------- 楼上的大侠再说得详细点吧,最好给个小例子,谢谢! --------------------编程问答-------------------- 帮顶 --------------------编程问答-------------------- MARK学习下 --------------------编程问答-------------------- MARK --------------------编程问答-------------------- http://windows.chinaitlab.com/system/1961.html --------------------编程问答-------------------- MARK --------------------编程问答-------------------- http://netsecurity.51cto.com/art/200602/21045.htm --------------------编程问答-------------------- mark --------------------编程问答-------------------- Dim CertEnroll
Set CertEnroll = CreateObject( "CEnroll.CEnroll" )
Dim RequestStr, CertRequest, Disposition, ID
CertEnroll.ProviderName = "Microsoft Enhanced Cryptographic Provider v1.0"
CertEnroll.KeySpec = 1
CertEnroll.GenKeyFlags = 1
RequestStr = CertEnroll.createRequest( XECR_CMC, "CN=此处为用户名", "1.3.6.1.5.5.7.3.2" )
Set CertRequest = CreateObject( "CertificateAuthority.Request" )
Disposition = CertRequest.Submit( &Hff , RequestStr, "", "Localhost\MyCertAuth" )
ID = CertRequest.GetRequestId
等到服务器批准证书后,可以根据ID获得
CertRequest.GetCertificate(ID)
--------------------编程问答-------------------- 顶! --------------------编程问答-------------------- to littlegang(Gang):
有C#版的代码吗?
还有,这个是不是到CA服务器上申请的证书啊? --------------------编程问答-------------------- up --------------------编程问答-------------------- up,哪个大哥能发我一份有关数字证书的资料,有源程序更好,谢谢.yuanzhihua520@163.com --------------------编程问答-------------------- http://www.dotnetsky.net/netsave/ShowTopic-9054.html
http://blog.csdn.net/bat800/category/295843.aspx --------------------编程问答-------------------- 我正在研究这方面的东西,有C#的源码,不过对于那个服务器地址的参数还是不知道该填什么好。源码如下:
public string CreateCA(string a_sName, string a_sEmail, string a_sCompany, string a_sDepartment, string a_sCity, string a_sState, string a_sCountry, string a_sCA)
{
CERTCLIENTLib.ICertRequest CertRequest = new CERTCLIENTLib.CCertRequestClass();
XENROLLLib.ICEnroll4 CertEnroll = new XENROLLLib.CEnroll2Class();
try
{
string RequestStr;
int Disposition, ID;
string dNName = (((((("CN=" + a_sName) + ",O=" + a_sCompany) + ",OU=" + a_sDepartment) + ",L=" + a_sCity) + ",S=" + a_sState) + ",C=" + a_sCountry) + ",E=" + a_sEmail;
//CertEnroll.ProviderName = "Rainbow iKey 1000 RSA Cryptographic Service Provider";//加密服务提供程序CSP选择ikey 1000
CertEnroll.ProviderName = "Microsoft Enhanced Cryptographic Provider v1.0";
CertEnroll.KeySpec = AT_KEYEXCHANGE;
CertEnroll.GenKeyFlags = CRYPT_EXPORTABLE;
//CertEnroll.addCertTypeToRequest("User"); 在独立模式下不需要定义角色
RequestStr = CertEnroll.createRequest(XECR_CMC, dNName, "1.3.6.1.5.5.7.3.2");
Disposition = CertRequest.Submit(CR_IN_ENCODEANY | CR_IN_FORMATANY, RequestStr, "", a_sCA);
ID = CertRequest.GetRequestId();
return ID.ToString();
}
catch (Exception e)
{
return ""+e.Message;
}
} --------------------编程问答-------------------- 数字证书 是什么 ` 没听过` --------------------编程问答-------------------- 学习兼路过帮顶 --------------------编程问答-------------------- 没弄过,帮顶! --------------------编程问答-------------------- 07年的帖子居然还能顶起来。。。我该说什么呢。。。
补充:.NET技术 , ASP.NET