import self-signed certificates into iPhone

AID: 2402
  • Status: Published

5600 points

  • Byrduke15
  • TypeTips/Tricks
  • Posted on2010-02-06 at 05:03:13

If you need to import self-signed SSL certificates into your Apple iPhone, you may get the cryptic error message: "Invalid Profile - Profile format not recognized".

Apparently, the iPhone doesn't understand the usual PEM (Privacy-Enhanced Mail) certificates format, which is Base64 encoded. It needs the binary DER (Distinguished Encoding Rules) format.  Therefore, you will need to convert your existing PEM or self-signed SSL certificate .crt files into the binary DER format recognized by the iPhone.

One method of conversion, is using OpenSSL (www.openssl.org) which is an open source tool-kit.  For Windows users, see the OpenSSL for Windows site at gnuwin32.sourceforge.net for download.

Example OpenSSL command to convert a .crt file:

infile=cacert.crt
outfile=cacert.der
openssl x509 -in $infile -inform PEM -out $outfile -outform DER
                                  
1:
2:
3:

Select allOpen in new window


(Adjust the $infile and $outfile variables for your file names)

Example OpenSSL for Windows to convert a .crt file (the syntax for cmd.exe):

SET infile=cacert.crt
SET outfile=cacert.der
openssl x509 -in %infile% -inform PEM -out %outfile% -outform DER
                                  
1:
2:
3:

Select allOpen in new window



You probably want to import both your CA (certificate authority) certificate and your server certificate (for example, your mail server's certificate), so convert both and attach them to an email you send to your iPhone. Or you can put them on a web server and use Safari to get them from there (editor's note: this comes in handy considering in most cases the SSL certificates are being installed for your mail server and as such means you can't access email until the certificates are installed; therefore, sending an email will not work). Once you have them on the phone, you should be able to just double-click to install them (editor's note: on the new iPhone, I found that the Exchange set-up automatically pulled the CA/server certificates from the HTTPS OMA - Outlook Mobile Access - website also thus making life a little easier).

Asked On
2010-02-06 at 05:03:13ID2402
Tags

iPhone

,

SSL

,

certificates

,

invalid profile

Topic

iPhone

Views
10636

Comments

Add your Comment

Please Sign up or Log in to comment on this article.

Loading Advertisement...

Top iPhone Experts

  1. alanhardisty

    40,440

    0 points yesterday

    Profile
    Rank: Genius
  2. Programmer-x

    25,568

    400 points yesterday

    Profile
    Rank: Master
  3. akahan

    16,068

    0 points yesterday

    Profile
    Rank: Sage
  4. thinkpads_user

    13,068

    0 points yesterday

    Profile
    Rank: Genius
  5. ishcabittle

    8,668

    0 points yesterday

    Profile
    Rank: Master
  6. aarontomosky

    8,000

    0 points yesterday

    Profile
    Rank: Genius
  7. eoinosullivan

    7,600

    0 points yesterday

    Profile
    Rank: Genius
  8. MBobrek

    5,332

    0 points yesterday

    Profile
    Rank: Guru
  9. demazter

    5,300

    0 points yesterday

    Profile
    Rank: Genius
  10. jason1178

    4,800

    0 points yesterday

    Profile
    Rank: Genius
  11. dnesse

    4,000

    0 points yesterday

    Profile
  12. Darr247

    3,800

    0 points yesterday

    Profile
    Rank: Genius
  13. Harvester_of_Sorrow

    3,800

    0 points yesterday

    Profile
  14. nap0leon

    3,600

    0 points yesterday

    Profile
    Rank: Wizard
  15. greyknight17

    3,500

    0 points yesterday

    Profile
    Rank: Wizard
  16. DaBagBoy

    3,300

    0 points yesterday

    Profile
    Rank: Master
  17. vallis

    3,248

    0 points yesterday

    Profile
    Rank: Sage
  18. nikeswamish

    3,200

    0 points yesterday

    Profile
  19. Ray_Paseur

    2,800

    0 points yesterday

    Profile
    Rank: Savant
  20. akhafaf

    2,800

    0 points yesterday

    Profile
    Rank: Wizard
  21. nsx106052

    2,800

    0 points yesterday

    Profile
    Rank: Guru
  22. kguy18

    2,800

    0 points yesterday

    Profile
    Rank: Master
  23. SpeedyApocalypse

    2,800

    0 points yesterday

    Profile
    Rank: Wizard
  24. theSAPPHIRE

    2,668

    0 points yesterday

    Profile
    Rank: Master
  25. darbid73

    2,664

    0 points yesterday

    Profile
    Rank: Wizard

Hall Of Fame