Вопрос

I need to export one private key (identity) from my OSX Keychain from the command line. Using security, I can only figure out how to export all private keys (identities) as a single pkcs12 (p12) file. How do I export a specific one?

Это было полезно?

Решение

https://github.com/torsten/keychain_access works, but it doesn't support filtering by type. I submitted a pull request for this functionality. Until it is accepted, you can try my fork.

./keychain_access -p password_for_exported_private_key "Name of private key"
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top