[#SSL_get1_peer_certificate]
= SSL&lowbar;get1&lowbar;peer&lowbar;certificate
:mrdocs:

Return the peer&apos;s end&hyphen;entity X509 certificate, incrementing its reference count&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:X509.adoc[X509]*
SSL&lowbar;get1&lowbar;peer&lowbar;certificate(xref:SSL.adoc[SSL] const* s);
----

== Return Value

Peer certificate (caller must X509&lowbar;free), or NULL if none was presented &sol; no connection&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *s*
| SSL connection whose peer certificate is retrieved&period;
|===


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