[#SSL_check_chain]
= SSL&lowbar;check&lowbar;chain
:mrdocs:

Check whether certificate `x,` key `pk,` and `chain` suit the current TLS session&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
SSL&lowbar;check&lowbar;chain(
    xref:SSL.adoc[SSL]* s,
    xref:X509.adoc[X509]* x,
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* pk,
    xref:stack_st_X509.adoc[stack&lowbar;st&lowbar;X509]* chain);
----

== Return Value

Bitmask of CERT&lowbar;PKEY&lowbar;&ast; flags (CERT&lowbar;PKEY&lowbar;VALID means the chain is usable for this session)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *s*
| SSL object whose peer preferences and negotiated parameters constrain the check&period;
| *x*
| End&hyphen;entity certificate under consideration&period;
| *pk*
| Private key matching `x&period;`
| *chain*
| Intermediate CA certificates, or NULL &sol; empty when none are offered&period;
|===


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