• 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: How to generate .cer file in cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to generate .cer file in cocoa


  • Subject: Re: How to generate .cer file in cocoa
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 21 May 2014 06:53:05 -0700

On May 21, 2014, at 12:41 AM, Devarshi Kulshreshtha <email@hidden> wrote:

> Is there any method to generate .cer file in cocoa?

Not unless you already have a SecCertificateRef (which is just a wrapper around the same data that goes in a .cer file.)

Generating X.509 certificates is hard. OS X has some APIs for outputting ASN.1 but they’re hard to use, and you have to figure out the exact ASN.1 structure that makes up the cert. iOS doesn’t even have those APIs.

And guess what? To generate the certificate you still have to know the modulus and exponent of the public key, i.e. the raw public key data. Which is the problem you’re trying to work around with this.

There really is no alternative to groping the innards of the public key blob returned from the Keychain. Even if it’s undocumented and even if Quinn says not to. Apple has fscked up their security APIs to the point that you have to do it.

—Jens
_______________________________________________

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


References: 
 >How to generate .cer file in cocoa (From: Devarshi Kulshreshtha <email@hidden>)

  • Prev by Date: Re: How to generate .cer file in cocoa
  • Next by Date: Re: How to generate .cer file in cocoa
  • Previous by thread: Re: How to generate .cer file in cocoa
  • Next by thread: CGDisplaySetDisplayMode only working properly after calling twice in a row
  • Index(es):
    • Date
    • Thread