Is there an easier (or more elegant) way than this to get the NID in
order to e.g. identify a SGC certificate?

...
X509_EXTENSION *ex = X509_get_ext (x, i);

if (X509V3_EXT_print (bio, ex, 0))
{
    j = BIO_read (sb, buf, BUF_LEN);
    buf[j] = 0;
    ex_nid = OBJ_ln2nid (buf);
    isSGC = ex_nid == NID_ms_sgc || ex_nid == NID_ns_sgc;
}
...

Also, I've come across this extension which isn't listed in objetcs.h:
            X509v3 Extended Key Usage:
                Netscape Server Gated Crypto, Microsoft Server Gated
Crypto

--Patrik




______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to