Blame doc/functions/gnutls_prf_early

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