[#SSL_get_peer_cert_chain]
= SSL&lowbar;get&lowbar;peer&lowbar;cert&lowbar;chain
:mrdocs:

Return the certificate chain as sent by the peer (not necessarily the verified chain)&period;

== Synopsis

Declared in `&lt;openssl&sol;ssl&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:stack_st_X509.adoc[stack&lowbar;st&lowbar;X509]*
SSL&lowbar;get&lowbar;peer&lowbar;cert&lowbar;chain(xref:SSL.adoc[SSL] const* s);
----

== Return Value

STACK&lowbar;OF(X509) owned by the session (do not free&semi; may be invalidated by renegotiation), or NULL&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *s*
| SSL connection to query&semi; on the server the peer leaf must be obtained separately&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
