Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8677211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:23:57+00:00 2026-06-12T20:23:57+00:00

Can 3rd party application access iPhone’s keychain in order to add X509 certificate to

  • 0

Can 3rd party application access iPhone’s keychain in order to add X509 certificate to it? If yes, how can it be done?
If not, can it access keychain just to read certificates from it?

Basically, what I need is:
1) my application needs to access https site which uses certificate not signed by any trusted CA. when trying to connect via https, I get an exception.
2) it would be great If I could programmatically add the root’s certificate to the keychain; it would be sufficient if the user could access the site via Safari, accept its certificate, and then access the site using my application.

So far, I’ve been using the following interface to surpass https:

@interface NSURLRequest (DummyInterface)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString*)host;
+ (void)setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString*)host;
@end

but this is not exactly what I want.

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T20:23:58+00:00Added an answer on June 12, 2026 at 8:23 pm

    This Apple document should document enough stuff to permit adding self-signed certificate (or a self-signed certificate authority) into the keychain, and make it trusted. I didn’t test it, though. Source

    See also the top answer on this question. It, however, doesn’t seem to actually verify the validity of the certificate. Cocoanetics has also documented how to use NSURLConnection with self-signed certificates, and similarly also doesn’t seem to verify the validity.

    So, you almost certainly want to follow Apple’s instructions. The “Extracting and Evaluating an Identity From a *.P12 file” section appears to contain a complete example on how to import a certificate, even one protected with a passphrase.

    Combine that with “AdvancedURLConnections” sample code and the ServerTrustChallengeHandler class and you should be good to go.


    Here’s also a more complete example by Vanja Komadinović.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I build extensions for a 3rd party application. We do not have access to
We have Win Forms application uses the 3rd party windows native controls. Can these
I'm have access to a 3rd party application's database, and I see a field
Hi I am using a 3rd party library in my iPhone application that uses
Can you recommend any mechanism/technology/3rd party jar that does field validation (like field length
If a 3rd-party developer gives us .libs and/or .dlls generated with VC++ 2005, can
I am looking for a 3rd party licensing module that can be incorporated into
I have an application where I need to store 3rd party credentials to services
I have an MFC DLL that is loaded by a 3rd party application. How
Some 3rd party application executes mount and I want it to mean mount -t

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.