Click here to Skip to main content
14,430,522 members
Rate this:
Please Sign up or sign in to vote.
The following code snippets are from OpenSSL websites.

//Process all entries.

int i;
 X509_NAME_ENTRY *e;

 for (i = 0; i < X509_NAME_entry_count(nm); i++)
        {
        e = X509_NAME_get_entry(nm, i);
        /* Do something with e */
        }


//Process all common names.
int loc;
 X509_NAME_ENTRY *e;

 loc = -1;
 for (;;)
        {
        lastpos = X509_NAME_get_index_by_NID(nm, NID_commonName, lastpos);
        if (lastpos == -1)
                break;
        e = X509_NAME_get_entry(nm, lastpos);
        /


I wish to get entries such as Common Name, Country, Organisation etc.

How do I get them from the X509-NAME-ENTRY structure that is returned from the code snippets above. Or is there a better way to go about getting the said entries?

What I have tried:

I am yet to find any useful result from google search.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100