[#OSSL_CMP_SRV_CTX_init]
= OSSL&lowbar;CMP&lowbar;SRV&lowbar;CTX&lowbar;init
:mrdocs:

Register server&hyphen;side CMP message processing callbacks&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
OSSL&lowbar;CMP&lowbar;SRV&lowbar;CTX&lowbar;init(
    xref:OSSL_CMP_SRV_CTX.adoc[OSSL&lowbar;CMP&lowbar;SRV&lowbar;CTX]* srv&lowbar;ctx,
    void* custom&lowbar;ctx,
    xref:OSSL_CMP_SRV_cert_request_cb_t.adoc[OSSL&lowbar;CMP&lowbar;SRV&lowbar;cert&lowbar;request&lowbar;cb&lowbar;t] process&lowbar;cert&lowbar;request,
    xref:OSSL_CMP_SRV_rr_cb_t.adoc[OSSL&lowbar;CMP&lowbar;SRV&lowbar;rr&lowbar;cb&lowbar;t] process&lowbar;rr,
    xref:OSSL_CMP_SRV_genm_cb_t.adoc[OSSL&lowbar;CMP&lowbar;SRV&lowbar;genm&lowbar;cb&lowbar;t] process&lowbar;genm,
    xref:OSSL_CMP_SRV_error_cb_t.adoc[OSSL&lowbar;CMP&lowbar;SRV&lowbar;error&lowbar;cb&lowbar;t] process&lowbar;error,
    xref:OSSL_CMP_SRV_certConf_cb_t.adoc[OSSL&lowbar;CMP&lowbar;SRV&lowbar;certConf&lowbar;cb&lowbar;t] process&lowbar;certConf,
    xref:OSSL_CMP_SRV_pollReq_cb_t.adoc[OSSL&lowbar;CMP&lowbar;SRV&lowbar;pollReq&lowbar;cb&lowbar;t] process&lowbar;pollReq);
----

== Return Value

1 on success, 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *srv&lowbar;ctx*
| Server context to initialize&period;
| *custom&lowbar;ctx*
| Application pointer returned by OSSL&lowbar;CMP&lowbar;SRV&lowbar;CTX&lowbar;get0&lowbar;custom&lowbar;ctx()&period;
| *process&lowbar;cert&lowbar;request*
| Callback for certificate requests, or NULL&period;
| *process&lowbar;rr*
| Callback for revocation requests, or NULL&period;
| *process&lowbar;genm*
| Callback for general messages, or NULL&period;
| *process&lowbar;error*
| Callback invoked when sending error messages, or NULL&period;
| *process&lowbar;certConf*
| Callback for certConf messages, or NULL&period;
| *process&lowbar;pollReq*
| Callback for pollReq messages, or NULL&period;
|===


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