Jean-Marc Desperrier wrote:
>
> Hi,
>
> Either I've got something wrong or there's a big problem here.
>
> I create new objects with OBJ_create, giving their OID as an argument
> and getting back an NID.
>
> Then I convert some data that is the DER encoding of an OID to an
> ASN1_OBJECT.
>
> I then call OBJ_obj2nid, expecting to get back the correct NID, if the
> OID of the object happens to be the one of the new object I created.
>
> Unfortunately I always get 0.
> I tried to understand why this happens.
>
There are several possible reasons for this. I've done some things which
use OBJ_create() fairly recently and I can't remember it being altered
since then.
You may be not using OBJ_create() properly: what arguments did you give
it?
Its possible you aren't using the ASN1 functions correctly.
To check this I suggest you write the object to a file then use
asn1parse on the file to see if you get the right "dotted" form of the
OID.
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
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]