OpenSSL C#.NET Wrapper X509采用可读格式

时间:2011-03-16 19:28:26

标签: c# .net openssl x509certificate

我使用OpenSSL的C#.NET Wrapper,我尝试以可读的形式生成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:

...(我删除了其余部分以获得明确的信息)

我该怎么做?感谢任何帮助=)

0 个答案:

没有答案