Set the pre‐shared key and PSK identifier for PSK / PSKAUTH modes.

Synopsis

Declared in <openssl/hpke.h>

int
OSSL_HPKE_CTX_set1_psk(
    OSSL_HPKE_CTX* ctx,
    char const* pskid,
    unsigned char const* psk,
    size_t psklen);

Return Value

1 on success, or 0 on error.

Parameters

Name

Description

ctx

HPKE context on sender or receiver (call before encap/decap).

pskid

NUL‐terminated PSK identity string (non‐NULL when a PSK is used).

psk

PSK bytes (non‐NULL; length at least OSSL_HPKE_MIN_PSKLEN).

psklen

Length of psk in bytes.

Created with MrDocs