当我做X509Certificate2 x509 = new X509Certificate2(certificateFile);
证书需要采用什么格式?
我有一个私钥:
-----BEGIN RSA PRIVATE KEY-----
......
-----END RSA PRIVATE KEY-----
和证书:
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
..............
Signature Algorithm: sha1WithRSAEncryption
Issuer: C=IL, ST=SS, L=...., O=....., OU=....., CN=...../emailAddress=.....
Validity
Not Before: Mar 19 14:45:09 2013 GMT
Not After : Mar 19 14:45:09 2014 GMT
Subject: C=IL, ST=SS, L=...., O=....., OU=....., CN=...../emailAddress=.....
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
...................
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
.........
X509v3 Authority Key Identifier:
keyid:..........
X509v3 Basic Constraints:
CA:TRUE
Signature Algorithm: sha1WithRSAEncryption
.....
然而,我无法使用上面的 C# 代码加载。我错过了什么?