When I run
security export -t identities
I get the same error message:
security: SecKeychainItemExport: Passphrase is required for import/export.
However, if I specify a format with the -f open (and put the binary output stream into a file), it works:
security export -P testing -f pkcs12 -t identities -o test.p12
yields a file I can work with via openssl.
It looks to me like security is just using the wrong error message here, thus making it look like the feature doesn't work. It probably should be saying "You must specify a format to export private keys", or words to that effect.
The actual insight comes from this tweet.