使用.NET从PKCS12文件中读取一个秘密

时间:2017-07-13 19:11:19

标签: .net encryption public-key-encryption pkcs#12

根据RSA关于PKCS12格式的docs,它可用于存储“其他秘密”。从规范:

4.2.5.  The SecretBag Type

   Each of the user's miscellaneous personal secrets is contained in an
   instance of SecretBag, which holds an object identifier-dependent
   value.  Note that a SecretBag contains only one secret.

   SecretBag ::= SEQUENCE {
       secretTypeId   BAG-TYPE.&id ({SecretTypes}),
       secretValue    [0] EXPLICIT BAG-TYPE.&Type ({SecretTypes}
                          {@secretTypeId})
   }

   SecretTypes BAG-TYPE ::= {
       ... -- For future extensions
   }

   Implementers can add values to this set at their own discretion.

我想用.NET阅读这些秘密,但我无法弄清楚如何使用X509Certificate2,或者即使它是可能的。可以吗?

0 个答案:

没有答案