"Kim, Peter" wrote:
>
> Hi,
>
> I must have an old version of OpenSSL.
>
> In fact, I was looking for a function with a name similar to what you
> pointed out. I had found a function called OBJ_txt2nid(), so I figured
> there would be a OBJ_nid2txt() function or something similar.
>
> I looked in objects.h under crypto/objects directory. Is that where it's
> supposed to be? I'm missing that function.
>
Well it should be in crypto/objects.h, the one you need is:
ASN1_OBJECT * OBJ_txt2obj(const char *s, int no_name);
it was added fairly recently. To handle general OIDs you need the
ASN1_OBJECT structure. Only OIDs in OpenSSLs internal table have a
usable NID, those not in there all have the NID NID_undef, whereas
arbitrary OIDs can be represented by an ASN1_OBJECT.
Steve.
--
Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED]
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]