I have a unique need here and hope there is someone out there that might be of help. There is a backend server that will send an x509 certificate and private key (as strings) after the mobile apps on-boarding process.
Additionally, the app includes an AWS SDK that is used to talk to their IoT system. This SDK requires PKCS12 certificate format to pass authentication. (I believe the common method is to have bundled the cert into the app which is not an option for me here sadly)
I suspect it may be possible to use some openSSL iOS framework to do this conversion at runtime but have not personally tried it yet as my go-to is usually trying things first with Apples APIs.
So my question becomes is there a way to meet this requirement using any of the security APIs or other APIs that apple has like swift-nio-ssl? Thank you very much for your time.
Best, Michael
This is something you should escalate via the support channel for that SDK. My best guess is that:
-
They’re confusing certificate and digital identity, meaning that the
certificateId
parameter actually identifies the digital identity in your keychain. -
They’re expecting your to import the identity into your keychain and then pass in some identifier for that, like the name in the digital identity’s certificate, or perhaps a hash of it, or perhaps a keychain persistent reference.
However, that’s just speculation. Unless this code in open source — in which case you can trace the code to find out how its using this parameter — the only reliable option is to ask the authors.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"