[#OCSP_RESPID_set_by_key]
= OCSP&lowbar;RESPID&lowbar;set&lowbar;by&lowbar;key
:mrdocs:

Set a ResponderID to the SHA&hyphen;1 hash of `cert&apos;s` public key (default libctx)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
OCSP&lowbar;RESPID&lowbar;set&lowbar;by&lowbar;key(
    xref:OCSP_RESPID.adoc[OCSP&lowbar;RESPID]* respid,
    xref:X509.adoc[X509]* cert);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *respid*
| ResponderID to update&period;
| *cert*
| Certificate whose public key is hashed for the byKey identity&period;
|===


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