[openssl-users] PEM X509 certificate with no newline

Ken Goldman kgoldman at us.ibm.com
Thu Sep 3 16:28:48 UTC 2015

My application receives an X509 certificate string in PEM format 
(separators and base64 encoded certificate) with no newlines.

PEM_read_bio_X509() fails because of the missing newlines.

I can write some preprocessing code to add newlines every 72 characters 
when writing the BIO.

I also thought about using a base64 filter in the BIO and stripping the 
separators first.

Is there a strightforward approach, where I can send the entire PEM 
string and get back the X509 structure without preprocessing?

More information about the openssl-users mailing list