• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Displaying untrusted certificate information in iOS app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying untrusted certificate information in iOS app


  • Subject: Re: Displaying untrusted certificate information in iOS app
  • From: Roland King <email@hidden>
  • Date: Sun, 17 Nov 2013 11:17:52 +0800

on iOS .. unless any new security api points were added in the last release or two, it's not very easy.  iOS is pretty weak here and my bugreport asking for more security API points remains open.

You can call SecCertificateCopyData which gives you a DER encoded X.509 cert which you then stick through an ASN1 parser and extract the bits you want. Or if you are feeling lucky you can scan the raw data for the patterns which match the information in the ASN1 data and pick out just the bits you need. I wrote a parser as it's a handy thing to have in the toolbox.

There's a SecCertificateCopySubjectSummary function which returns a CFString, I have no idea what's in it, if it has any information you'd find useful, rather doubt it has all the stuff you want, however you could try displaying that to the user.



On 17 Nov, 2013, at 11:07 am, Devarshi Kulshreshtha <email@hidden> wrote:

> one more quick question.. how can I extract information from this class:
> SecCertificateRef
>
> Its syntax seems to be very weird as compared to normal cocoa classes :-(
>
> If you can give some example of extracting - organization name, email
> address, and expiry date, it will be very helpful.
>
>
> On Sat, Nov 16, 2013 at 8:46 PM, Jens Alfke <email@hidden> wrote:
>
>>
>> On Nov 16, 2013, at 6:41 PM, Devarshi Kulshreshtha <
>> email@hidden> wrote:
>>
>> Q1. How can I obtain above enlisted information? Is there any cocoa API to
>> provide the same?
>>
>>
>> SecCertificateRef
>>
>> Q2. Generally in a web browser it presents all details related to that
>> certificate. Do we need to follow the same behavior in an iOS app?
>>
>>
>> That’s up to you, I think.
>>
>> —Jens
>>
>
>
>
> --
> Thanks,
>
> Devarshi
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Displaying untrusted certificate information in iOS app
      • From: Jens Alfke <email@hidden>
References: 
 >Displaying untrusted certificate information in iOS app (From: Devarshi Kulshreshtha <email@hidden>)
 >Re: Displaying untrusted certificate information in iOS app (From: Jens Alfke <email@hidden>)
 >Re: Displaying untrusted certificate information in iOS app (From: Devarshi Kulshreshtha <email@hidden>)

  • Prev by Date: Re: Displaying untrusted certificate information in iOS app
  • Next by Date: Re: Displaying untrusted certificate information in iOS app
  • Previous by thread: Re: Displaying untrusted certificate information in iOS app
  • Next by thread: Re: Displaying untrusted certificate information in iOS app
  • Index(es):
    • Date
    • Thread