Failing SecPKCS12Import API after update in openssl 3.x

Hi,

I have a project which uses OpenSSL and SecPKCS12Import API. with open ssl 1.x this was working smoothly. but recently after the update in openssl 3.x SecPKCS12Import starts failing with the error:

SecPKCS12Import Optional(Error Domain=NSOSStatusErrorDomain Code=-25293 "The user name or passphrase you entered is not correct." UserInfo={NSLocalizedDescription=The user name or passphrase you entered is not correct.})

Technology used: Xcode: 14.0.1 OpenSSL: 3.0.5 iOS: 16

See the later posts on this thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

The solution provided by the above thread (https://developer.apple.com/forums/thread/697030?login=true#:~:text=Thanks%20to%20Quinn,be%20Apple%2Dcompatible) is not working for me.

java version "1.8.0_341" Java(TM) SE Runtime Environment (build 1.8.0_341-b10) Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)

macos 13.0.1

any suggestions here?

I discovered exactly the same problem yesterday and couldn’t believe it. Self signed p12 certs with openssl 3.x can not be imported in iOS/obj-c. After some try and error I found out that even certs made with openssl 1.x can not be parsed with openssl 3.x command line execution. So my decision was to rebuild and reinstall openssl 1.1.1.s and to forget version 3.x. I don’t know if there are more incompatibilities, but only this example has shown me to be carefully with updates of this lib. Sorry for having no solution and just sharing my experience .

Failing SecPKCS12Import API after update in openssl 3.x
 
 
Q