OpenSSL C#.NET Wrapper X509 in a readable Format
Iam using the C#.NET Wrapper of OpenSSL and i try to generate an X509 certification in a readable form. I can create an x开发者_StackOverflow中文版509 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 =)
精彩评论