1gnutls_prf_early(3)                 gnutls                 gnutls_prf_early(3)
2
3
4

NAME

6       gnutls_prf_early - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int gnutls_prf_early(gnutls_session_t session, size_t label_size, const
12       char * label, size_t context_size, const char *  context,  size_t  out‐
13       size, char * out);
14

ARGUMENTS

16       gnutls_session_t session
17                   is a gnutls_session_t type.
18
19       size_t label_size
20                   length of the  label variable.
21
22       const char * label
23                   label used in PRF computation, typically a short string.
24
25       size_t context_size
26                   length of the  extra variable.
27
28       const char * context
29                   optional extra data to seed the PRF with.
30
31       size_t outsize
32                   size of pre-allocated output buffer to hold the output.
33
34       char * out  pre-allocated buffer to hold the generated data.
35

DESCRIPTION

37       This function is similar to gnutls_prf_rfc5705(), but only works in TLS
38       1.3 or later to export early keying material.
39
40       Note that the keying material is only available after  the  ClientHello
41       message is processed and before the application traffic keys are estab‐
42       lished.  Therefore this function shall be called in  a  handshake  hook
43       function for GNUTLS_HANDSHAKE_CLIENT_HELLO.
44
45       The   label variable usually contains a string denoting the purpose for
46       the generated data.
47
48       The  context variable can be used to add more data to the  seed,  after
49       the random variables.  It can be used to make sure the generated output
50       is strongly connected to some additional data (e.g., a string  used  in
51       user authentication).
52
53       The output is placed in  out , which must be pre-allocated.
54
55       Note  that,  to provide the RFC5705 context, the  context variable must
56       be non-null.
57

RETURNS

59       GNUTLS_E_SUCCESS on success, or an error code.
60

SINCE

62       3.6.8
63

REPORTING BUGS

65       Report bugs to <bugs@gnutls.org>.
66       Home page: https://www.gnutls.org
67
68
70       Copyright © 2001-2020 Free Software Foundation, Inc., and others.
71       Copying and distribution of this file, with  or  without  modification,
72       are  permitted  in  any  medium  without royalty provided the copyright
73       notice and this notice are preserved.
74

SEE ALSO

76       The full documentation for gnutls is maintained as  a  Texinfo  manual.
77       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
78       visit
79
80       https://www.gnutls.org/manual/
81
82gnutls                              3.6.13                 gnutls_prf_early(3)
Impressum