Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Certificate chain in memory buffer

391 views
Skip to first unread message

Aravind GJ

unread,
Nov 22, 2011, 11:32:11 PM11/22/11
to
Hi All,

I use BIO_new_mem_buf and PEM_read_bio_X509 to convert the certificate in memory buffer to X509 certificate format. Finally the certificate is then added to the CA store.

If the buffer contains certificate chain like
 -----BEGIN CERTIFICATE-----
 ... (CA certificate 1) ...
 -----END CERTIFICATE-----
 -----BEGIN CERTIFICATE-----
 ... (CA certificate 2) ...
 -----END CERTIFICATE-----
-----BEGIN CERTIFICATE----- ... (CA certificate 3) ... -----END CERTIFICATE-----

Only the first certificate is then read. Is there a way to handle the appended CA's?
I cannot use SSL_CTX_load_verify_locations as my program does not have access to the file system or the files directly.
Regards
Aravind GJ

Dave Thompson

unread,
Nov 23, 2011, 4:44:12 PM11/23/11
to
> From: owner-ope...@openssl.org On Behalf Of Aravind GJ
> Sent: Tuesday, 22 November, 2011 23:32

> I use BIO_new_mem_buf and PEM_read_bio_X509 to convert
> the certificate in memory buffer to X509 certificate format.
> Finally the certificate is then added to the CA store.

> If the buffer contains certificate chain like <snip>
> Only the first certificate is then read. Is there
> a way to handle the appended CA's?

Works for me. Check your code, or see (simplified) attachment.
Make sure all your BEGIN/END lines are correct and in particular
you don't have one --END-- and next --BEGIN-- on same line.

aravind.c
0 new messages