4

I have created two SecKeyRef items via SecKeyGeneratePair, but now I would like to turn the public key into a x509 Digital Certificate – and/or both the public and private keys into a PKCS #12 (.p12) certificate – and save it to disk as a file. This way I can do whatever I need to with it, including sending the certificates to other services or computers.

I would prefer to not use the keychain, but even with that I am having some trouble finding good documentation on exactly how to create a certificate out of a pair of SecKeyRefs, and writing them out as a certificate file.

4

1 回答 1

2

您需要安全转换编程指南。它涵盖了您对此所需的大部分内容。某些部分(如SecItemExport)未记录在参考文档中,仅记录在公共头文件中。但这SecItemExport是处理这些东西的新 10.7 方法。

于 2011-09-28T16:02:07.693 回答