You can use the security command from the terminal; unfortunately, at least on my MBP with Snow Leopard, there seems to be a segmentation error in one of the commands that need to be executed. For more information, exit the terminal
man security
In any case, here is what you can try, considering that your development / production certificates are stored in the login login chain:
security unlock-keychain login.keychain; security find-certificate -a -c "iPhone Distribution: Your name" -p > cert.pem;
The second command raises a segmentation error (caused by the -c argument), but it should be exactly what you need. Alternatively, you can use
security find-identity -p codesigning -v;
to get a list of all valid certificates that you can use to encode the signatures of your applications. For each certificate, the output also contains a SHA1 message digest, so you can easily search for a certificate in the key chain corresponding to the SHA1 digest associated with iPhone Distribution: Your Name. This, however, requires you to write your application using keychain APIs.
Let me know if this works on your mac or if you encounter the same segmentation error.
EDIT / UPDATE : I checked the error on other machines and gave an Apple error.
source share