如何在c#中编码x509证书 [英] how to encode x509 certificate in c#

查看:422
本文介绍了如何在c#中编码x509证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello导师,



需要一些紧急帮助。我对Webservices中的证券很陌生。

我需要在与第三方Web服务交互时添加消息签名。

想要添加具有少量属性的SOAP头。



到目前为止,我正在使用x509证书握手。要求说证书也应编码为base64Binary。



我到现在为止做什么 -



X509Certificate2Collection col =(X509Certificate2Collection)store.Certificates.Find(X509FindType.FindBySerialNumber,ConfigurationManager.AppSettings [SSLCertificateSerialNumber],true);



并且只需使用证书商店的第一个证书。







初学者的任何指针?

Hello mentors,

Need some urgent help. I am quite new to Securities in Webservices.
I got a requirement to add message signing while interacting with a 3rd party web service.
Want to add SOAP header with few attributes.

I am using x509 certificate handshaking till now. The requirement says that the certificate should be encoded to base64Binary also.

What i am doing till now-

X509Certificate2Collection col = (X509Certificate2Collection)store.Certificates.Find(X509FindType.FindBySerialNumber, ConfigurationManager.AppSettings["SSLCertificateSerialNumber"], true);

and simply using the first certificate in certificate store .



Any pointers for a beginner?

推荐答案

也许以下链接可能会有所帮助:

将证书导出为BASE-64编码的.cer [ ^ ]
Maybe the following link could be helpful:
Exporting a Certificate as BASE-64 encoded .cer[^]


这篇关于如何在c#中编码x509证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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