On Fri, Jun 26, 2009, Natanael Mignon - michael-wessel.de wrote:

> Dear list,
> 
> as this is a case of *using* OpenSSL libraries from Apache's mod_ssl, I hope
> I'm on the right list. ;)
> 
> I am currently working on - dirty, please have mercy - customizations of
> mod_ssl and especially OCSP-handling for a specific project (on basis of
> Apache 2.3 code). As I am neither a seasoned C-coder nor familiar with
> OpenSSL libraries, I am having problems extracting the issuer name from an
> X.509 cert into a usable string format.
> 
> So, I have to get the issuer name from the cert and build a filename to
> fopen(). That's the point where I am stuck because of type problems (how to
> get a char* or some string from an X509_NAME?)...
> 
> If this inquiry is off-topic, please give me a hint to where I could ask for
> help, or drop me a line, if more detail is required.
> 
> Any help is highly appreciated, thanks in advance!
> 

The standard way to do this with OpenSSL is with X509_NAME_hash() which
returns a 32 bit integer which is then turned into a hex value with a number
appended in case of duplicates.

There is a function which will do the whole thing for a cerificate:
X509_issuer_name_hash() the x509.c and crl.c source files in apps show how it
is used.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to