> [[email protected] - Thu Dec 03 20:55:37 2009]:
> 
> Hi, 
> am I missing something or following source code shows an OpenSSL
> bug 
> (duplication is not well performed) ? 
> 

Your problem is accessing the structures directly. This should be
avoided where possible as it can produce misleading results, the "sn"
field is only currently set if the OID is directly initialised from the
registered table, duplicated OIDs wont have it set.

If instead of accessing "sn" you use OBJ_nid2sn(OBJ_nid2obj(oid)) you
get the correct result.

Note that you can also avoid accessing the X509_ALGOR directly by using
X509_ALGOR_get0().

Steve.
-- 
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to