Hello!
I have a quirky situation that I am looking for a solution to.
The iOS app I am working on needs to be able to communicate with systems that do not have valid root certs. Furthermore, these systems addresses will be sent to the user at run time. The use case is that administrators will provide a self signed certificate (.pem) for the iPhones to download which will then be used to pass the authentication challenge.
I am fairly new to customizing trust and my understanding is that it is very easy to do it incorrectly and expose the app unintentionally.
Here is our users expected workflow:
An administrator creates a public ip server.
The ip server is then configured with dns.
A .pem file that includes a self signed certificate is created for the new dns domain.
The pem file is distributed to iOS devices to download and enable trust for.
When they run the app and attempt to establish connection with the server, it will not error with an SSL error.
When I run the app without modification to the URLSessionDelegate method(s) I do get an SSL error.
Curiously, attempting to hit the same address in Safari will not show the insecure warning and proceed without incident.
What is the best way to parity the Safari use case for our app? Do I need to modify the
urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)
method to examine the NSURLAuthenticationMethodServerTrust? Maybe there is a way to have the delegate look through all the certs in keychain or something to find a match? What would you advise here?
Sincerely thank you for taking the time to help me,
~Puzzled iOS Dev
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I created a new iOS project (storyboard if it matters) and added a bunch of C files to it. Some portion of the C files depend on libcurl. I would like to be able to build for both simulator and device if possible. Google claims that Xcode can provide the dependency as part of the inbuilt libraries however I do not see libcurl.4.tbd (or any version) as an option to choose. Is this feature no longer available or is there something I am missing here?
For context here is a screen shot of my build error situation
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
Topic:
Privacy & Security
SubTopic:
General
Tags:
Frameworks
Security
Apple CryptoKit
Signing Certificates