I am building an app with Flutter and am focusing specifically on iOS here. I want to pass a certificate installed on my iOS device to a proxy server with every HTTP request.
I have tried with installing pfx and a p12, and also deployed both a user-targeted and device-targeted PKCS certificate from Intune. I use the following to allow the OS to select a cert, but it doesn't pass anything, as seen in my HTTP request (400 error telling me that no client SSL certificate was sent).
if method == NSURLAuthenticationMethodClientCertificate {
completionHandler(.performDefaultHandling, nil)
return
}
I see that the client certificate is requested by the server and there is one acceptable issuer that matches the issuer on my certificates. I get a -25300 error from SecItemCopyMatching.
I also try logging the certificates that the app has access to and I'm unable to see any. Not sure if this is just a limitation of a third-party app or if it truly cannot see those certificates.
Also wanted to add that I have trusted the root certificate.
Is it possible for my app to access certificates (p12, pfx, or PKCS deployed by Intune)? What's the best way to go about this?