2012/2/16 Iñaki Baz Castillo <[email protected]>:
> Now I've realized that in case the client presents a chain of public
> certificates (rather than a single certificate) the function
> SSL_get_peer_certificate (or maybe the functions PEM_write_bio_X509 or
> BIO_read) just takes the first certificate in the chain.
>
> How could I get all the certificates in the chain together? I've found:
>
>  STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *ssl);
>
> but I don't find the STACK_OF(X509) definition so I don't know what it is.
>
> Thanks for any help.

As far as I see, SSL_get_peer_cert_chain(ssl) does never return NULL,
regardless the client presented a single certificate, a certificate +
chain of certificates, or no certificate at all. Am I miss something?
SSL_get_peer_cert(ssl) does return NULL in case of no client's
certificate.

Thanks a lot.

-- 
Iñaki Baz Castillo
<[email protected]>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to