On Thu, Dec 18, 2008, Moribius wrote: > > fp is not NULL; > > But perhaps my certificate has special contents, I can't imagine another > origin for that problem. > I can't post the certificate because it's a private one, sorry. > > So can anyone explain me how to process whith specials content? > > On an other hand, I've tried another solution: > > string certificateFile = "cert.pem"; > X509* cert; > BIO* bio_cert = BIO_new_file(certificateFile.c_str(), "rb"); > PEM_read_bio_X509(bio_cert, &cert, NULL, NULL); > > At this time, I've not yet error. But my goal is to catch information on it, > so I try to read the name like that: > > X509_NAME * name=NULL; > name=X509_get_subject_name(cert); > > And....error!!! > :confused: >
Well the above is a problem because "cert" is passed to the function uninitialized and the function will try to use the garbage data there. Set "cert" to NULL first. Also if you are on Windows make sure it isn't a runtime library conflict: see FAQ. 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