[#SSL_CTX_set_cert_verify_callback]
= SSL&lowbar;CTX&lowbar;set&lowbar;cert&lowbar;verify&lowbar;callback
:mrdocs:

Replace the built&hyphen;in peer certificate verification procedure with an application callback&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
SSL&lowbar;CTX&lowbar;set&lowbar;cert&lowbar;verify&lowbar;callback(
    xref:SSL_CTX.adoc[SSL&lowbar;CTX]* ctx,
    int(* cb)(xref:X509_STORE_CTX.adoc[X509&lowbar;STORE&lowbar;CTX]*, void*),
    void* arg);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| SSL context&semi; SSL objects created from it inherit `cb` and `arg` at SSL&lowbar;new time&period;
| *cb*
| Verification callback receiving the X509&lowbar;STORE&lowbar;CTX and `arg&semi;` return 1 to accept, 0 to fail&semi; NULL restores the default&period;
| *arg*
| Application pointer passed to `cb` on each invocation&period;
|===


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