如何找到数字证书并签名 用delphi做的,需要数字签名,不知道从哪里下手,有没有现成的代码。1、找到电脑里的数字证书。2、做好数字签名,返回签名字符串。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 获得签名你可以根据证书格式去解析,但用证书签名没法实现,楼主应该好好了解下证书的原理和SSL协议 楼上的高手,您的意思是不是这样如果我已经有一个证书,需要对一个字符串签名,获得签名的返回值,用delphi是做不出来的,是吗?我目前是用网页做,我想把这段功能,做进delphi,你看是可行,还是不可行?<script type="text/javascript">var iTrusPTA = new ActiveXObject("PTA.iTrusPTA.1"); //创建PTA对象var certs = iTrusPTA.MyCertificates; //返回证书集合document.write("浏览器证书信息:");document.write("<br/>");for(var i = 0; i < certs.Count; i++) { //浏览器证书集合 document.write("证书("+(i+1)+"):"); document.write("<br/>"); document.write(certs(i).SerialNumber); document.write("<br/>"); document.write(certs(i).Subject); document.write("<br/>"); document.write(certs(i).Issuer); document.write("<br/>"); document.write("<br/>");}document.write("请选择需要用作签名的证书:");document.write('<select id="certIndex" >');for(var i = 0; i < certs.Count; i++) { var str = '<option value="' + i + '">'+"证书("+(i+1)+")"+"</option>"; document.write(str);}document.write("</select>");document.write("<br/>");function bt_submit_onclick() { var certIndex = document.getElementById("certIndex").value;//选择支付宝数字证书 var Signature = document.getElementById("Signature").value;//待签名的字符串 var cert = certs(certIndex); var result = cert.SignMessage(Signature, 0x04);//result:返回的数字签名 alert(result);}</script><input name="Signature" type="text" value="" size="100"/>//这里输入待签名的字符串<input name="123" type="button" value="数字签名" onclick="bt_submit_onclick()" /> 数字证书方面用的人真有点少呀,我也想问个问题如帖子Delphi中对证书的基本操作如何实现http://topic.csdn.net/u/20110703/17/85721d3e-1460-409c-9b12-064e9fd4285a.html最好能实现这个AB.CER证书的安装,如图:Delphi中对证书的基本操作声明:安装证书已完成 如何实现用DELPHI编程实现校验证书和删除证书都是指定的.......... UTF8encode 的乱码问题 请教深圳的朋友,顺便散分 人心不古 《Delphi深度探索第二版》源码从何而来? 为什么我的ToolBar上的ToolButton宽度不能够调整? WebBrowser1怎样得到网页中所有的标签? 这个SQL语句怎么写? 头痛的小数位问题!!! 急,求助,在线等待! Delphi+SQLserver2000发布,哪种方式用安装客户端,哪种不用?up有分! form1打开form2后,在form2中怎么样调用form1中的控件?(115字) delphi如何导出数据excel2007 请教:操作外部程序时,外部条件变化时如何及时更新外部程序菜单项的状态?
var iTrusPTA = new ActiveXObject("PTA.iTrusPTA.1"); //创建PTA对象
var certs = iTrusPTA.MyCertificates; //返回证书集合
document.write("浏览器证书信息:");
document.write("<br/>");
for(var i = 0; i < certs.Count; i++) { //浏览器证书集合
document.write("证书("+(i+1)+"):");
document.write("<br/>");
document.write(certs(i).SerialNumber);
document.write("<br/>");
document.write(certs(i).Subject);
document.write("<br/>");
document.write(certs(i).Issuer);
document.write("<br/>");
document.write("<br/>");
}
document.write("请选择需要用作签名的证书:");
document.write('<select id="certIndex" >');
for(var i = 0; i < certs.Count; i++) {
var str = '<option value="' + i + '">'+"证书("+(i+1)+")"+"</option>";
document.write(str);
}
document.write("</select>");
document.write("<br/>");
function bt_submit_onclick()
{
var certIndex = document.getElementById("certIndex").value;//选择支付宝数字证书
var Signature = document.getElementById("Signature").value;//待签名的字符串
var cert = certs(certIndex);
var result = cert.SignMessage(Signature, 0x04);//result:返回的数字签名
alert(result);
}</script>
<input name="Signature" type="text" value="" size="100"/>//这里输入待签名的字符串
<input name="123" type="button" value="数字签名" onclick="bt_submit_onclick()" />
我也想问个问题
如帖子
Delphi中对证书的基本操作如何实现
http://topic.csdn.net/u/20110703/17/85721d3e-1460-409c-9b12-064e9fd4285a.html
最好能实现这个AB.CER证书的安装,如图:
Delphi中对证书的基本操作声明:
安装证书已完成
校验证书和删除证书
都是指定的..........