Re: OCTET_STRING_t -> NSString?
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