SecPKCS12Import always fails with errSecPkcs12VerifyFailure if no password is set

Originator:ryan
Number:rdar://22909471 Date Originated:29-Sep-2015 07:51 PM
Status:Closed-Duplicate Resolved:02-Oct-2015 05:05 PM
Product:OS X SDK Product Version:10.10.5
Classification:Serious Bug Reproducible:Always
 
Closed as a duplicate of 12503102.

Summary:
SecPKCS12Import will always fail if provided a PKCS12 file where no password has been set. The error returned is errSecPkcs12VerifyFailure.

Steps to Reproduce:
Call SecPKCS12Import providing a PKCS12 file without a password.

Expected Results:
To return a successful status and populate the provided output parameter.

Actual Results:
The function returns errSecPkcs12VerifyFailure.

Notes:
The only workaround is to re-save the PKCS12 file with a password. Attempting to open the file in Keychain Access also gives this error, even after prompting for the password and providing an empty one.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!