可读格式的 OpenSSL C#.NET 包装器 X509
我正在使用 OpenSSL 的 C#.NET 包装器,并尝试以可读的形式生成 X509 认证。 我可以使用创建 x509 证书
X509Certificate x509 = new X509Certificate(int serial,
X509Name subject,
X509Name issuer,
CryptoKey pubkey,
DateTime start,
DateTime end)
然后我使用 x509.PEM 将其保存为 PEM 格式,但我想以可读的方式保存它,例如:
证书:
Data:
Version: 3 (0x2)
Serial Number: 1234 (0x4d2)
Signature Algorithm: sha1WithRSAEncryption
Issuer: CN=Root
Validity
Not Before: May 13 18:59:46 2009 GMT
Not After : May 13 18:59:46 2010 GMT
Subject: CN=Root
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (4096 bit)
Modulus (4096 bit):
00:b2:ed:1d:e9:8a:56:80:a8:d4:d8:ca:da:e7:d0:
66:75:66:df:3c:2a:7d:79:d7:62:d7:3e:69:a0:d9:
3e:46:fd:e2:55:a7:18:58:81:bd:79:49:ae:37:de:
28:17:a7:0d:e4:1b:f1:d6:69:b5:5e:ce:30:02:74:
...(我删除了其余部分以获得清晰的消息)
我怎样才能做到呢?感谢您的帮助=)
Iam using the C#.NET Wrapper of OpenSSL and i try to generate an X509 certification in a readable form.
I can create an x509 certificate using
X509Certificate x509 = new X509Certificate(int serial,
X509Name subject,
X509Name issuer,
CryptoKey pubkey,
DateTime start,
DateTime end)
Then I used x509.PEM to save it in a PEM Format but I want to save it in a readable way like this for example:
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 1234 (0x4d2)
Signature Algorithm: sha1WithRSAEncryption
Issuer: CN=Root
Validity
Not Before: May 13 18:59:46 2009 GMT
Not After : May 13 18:59:46 2010 GMT
Subject: CN=Root
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (4096 bit)
Modulus (4096 bit):
00:b2:ed:1d:e9:8a:56:80:a8:d4:d8:ca:da:e7:d0:
66:75:66:df:3c:2a:7d:79:d7:62:d7:3e:69:a0:d9:
3e:46:fd:e2:55:a7:18:58:81:bd:79:49:ae:37:de:
28:17:a7:0d:e4:1b:f1:d6:69:b5:5e:ce:30:02:74:
...(I deleted the rest for a clear message)
How can I make it ? thanks for any help =)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论