• 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: OCTET_STRING_t -> NSString?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OCTET_STRING_t -> NSString?


  • Subject: Re: OCTET_STRING_t -> NSString?
  • From: Wim Lewis <email@hidden>
  • Date: Tue, 29 Mar 2011 12:54:01 -0700

On 29 Mar 2011, at 12:26 PM, Chris Ridd wrote:
> liblber can only decode the restricted BER defined for use with LDAP. In particular, no indefinite length encoding, strings can't be constructed, etc. The lber-decode man page mentions this at the top.
>
> Given this is all likely to be part of security data, I'd say use the crypto libraries and/or OpenSSL to crack it apart.

If the security data is in DER, then lber's restricted subset of BER might still suffice. (I haven't looked.)

But yes, linking openssl and using d2i_ASN1_type_bytes() and either ASN1_STRING_to_UTF8() or mapping the ASN.1 string types to (Core)Foundation string encodings seems like an easy(ish) way to get correct behavior.


_______________________________________________

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: OCTET_STRING_t -> NSString?
      • From: Todd Heberlein <email@hidden>
References: 
 >OCTET_STRING_t -> NSString? (From: Todd Heberlein <email@hidden>)
 >Re: OCTET_STRING_t -> NSString? (From: Todd Heberlein <email@hidden>)
 >Re: OCTET_STRING_t -> NSString? (From: "Stephen J. Butler" <email@hidden>)
 >Re: OCTET_STRING_t -> NSString? (From: Chris Ridd <email@hidden>)

  • Prev by Date: Re: OCTET_STRING_t -> NSString?
  • Next by Date: Re: OCTET_STRING_t -> NSString?
  • Previous by thread: Re: OCTET_STRING_t -> NSString?
  • Next by thread: Re: OCTET_STRING_t -> NSString?
  • Index(es):
    • Date
    • Thread