Blame doc/functions/gnutls_prf_early

Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
@deftypefun {int} {gnutls_prf_early} (gnutls_session_t @var{session}, size_t @var{label_size}, const char * @var{label}, size_t @var{context_size}, const char * @var{context}, size_t @var{outsize}, char * @var{out})
Packit Service 4684c1
@var{session}: is a @code{gnutls_session_t}  type.
Packit Service 4684c1
Packit Service 4684c1
@var{label_size}: length of the  @code{label} variable.
Packit Service 4684c1
Packit Service 4684c1
@var{label}: label used in PRF computation, typically a short string.
Packit Service 4684c1
Packit Service 4684c1
@var{context_size}: length of the  @code{extra} variable.
Packit Service 4684c1
Packit Service 4684c1
@var{context}: optional extra data to seed the PRF with.
Packit Service 4684c1
Packit Service 4684c1
@var{outsize}: size of pre-allocated output buffer to hold the output.
Packit Service 4684c1
Packit Service 4684c1
@var{out}: pre-allocated buffer to hold the generated data.
Packit Service 4684c1
Packit Service 4684c1
This function is similar to @code{gnutls_prf_rfc5705()} , but only works in
Packit Service 4684c1
TLS 1.3 or later to export early keying material.
Packit Service 4684c1
Packit Service 4684c1
Note that the keying material is only available after the
Packit Service 4684c1
ClientHello message is processed and before the application traffic
Packit Service 4684c1
keys are established.  Therefore this function shall be called in a
Packit Service 4684c1
handshake hook function for @code{GNUTLS_HANDSHAKE_CLIENT_HELLO} .
Packit Service 4684c1
Packit Service 4684c1
The  @code{label} variable usually contains a string denoting the purpose
Packit Service 4684c1
for the generated data.
Packit Service 4684c1
Packit Service 4684c1
The  @code{context} variable can be used to add more data to the seed, after
Packit Service 4684c1
the random variables.  It can be used to make sure the
Packit Service 4684c1
generated output is strongly connected to some additional data
Packit Service 4684c1
(e.g., a string used in user authentication).
Packit Service 4684c1
Packit Service 4684c1
The output is placed in  @code{out} , which must be pre-allocated.
Packit Service 4684c1
Packit Service 4684c1
Note that, to provide the RFC5705 context, the  @code{context} variable
Packit Service 4684c1
must be non-null.
Packit Service 4684c1
Packit Service 4684c1
@strong{Returns:} @code{GNUTLS_E_SUCCESS}  on success, or an error code.
Packit Service 4684c1
Packit Service 4684c1
@strong{Since:} 3.6.8
Packit Service 4684c1
@end deftypefun