[#OSSL_HPKE_CTX_set1_authpub]
= OSSL&lowbar;HPKE&lowbar;CTX&lowbar;set1&lowbar;authpub
:mrdocs:

Set the sender authentication public key for AUTH &sol; PSKAUTH modes&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
OSSL&lowbar;HPKE&lowbar;CTX&lowbar;set1&lowbar;authpub(
    xref:OSSL_HPKE_CTX.adoc[OSSL&lowbar;HPKE&lowbar;CTX]* ctx,
    unsigned char const* pub,
    size&lowbar;t publen);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Receiver HPKE context (call before OSSL&lowbar;HPKE&lowbar;decap())&period;
| *pub*
| Encoded sender authentication public key&period;
| *publen*
| Length of `pub` in bytes&period;
|===


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