1gnutls_prf(3)                       gnutls                       gnutls_prf(3)
2
3
4

NAME

6       gnutls_prf - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int  gnutls_prf(gnutls_session_t session, size_t label_size, const char
12       * label, int  server_random_first,  size_t  extra_size,  const  char  *
13       extra, size_t outsize, char * out);
14

ARGUMENTS

16       gnutls_session_t session
17                   is a gnutls_session_t structure.
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       int server_random_first
26                   non-0 if server random field should be first in seed
27
28       size_t extra_size
29                   length of the extra variable.
30
31       const char * extra
32                   optional extra data to seed the PRF with.
33
34       size_t outsize
35                   size of pre-allocated output buffer to hold the output.
36
37       char * out  pre-allocate buffer to hold the generated data.
38

DESCRIPTION

40       Apply  the  TLS Pseudo-Random-Function (PRF) using the master secret on
41       some data, seeded with the client and server random fields.
42
43       The label variable usually contain a string denoting  the  purpose  for
44       the  generated  data.   The  server_random_first  indicate  whether the
45       client random field or the server random field should be first  in  the
46       seed.  Non-0 indicate that the server random field is first, 0 that the
47       client random field is first.
48
49       The extra variable can be used to add more data to the seed, after  the
50       random variables.  It can be used to tie make sure the generated output
51       is strongly connected to some additional data (e.g., a string  used  in
52       user authentication).
53
54       The output is placed in *OUT, which must be pre-allocated.
55

RETURNS

57       GNUTLS_E_SUCCESS on success, or an error code.
58

REPORTING BUGS

60       Report    bugs    to    <bug-gnutls@gnu.org>.     GnuTLS   home   page:
61       http://www.gnu.org/software/gnutls/ General help  using  GNU  software:
62       http://www.gnu.org/gethelp/
63
65       Copyright © 2008 Free Software Foundation.
66       Copying  and  distribution  of this file, with or without modification,
67       are permitted in any medium  without  royalty  provided  the  copyright
68       notice and this notice are preserved.
69

SEE ALSO

71       The  full  documentation  for gnutls is maintained as a Texinfo manual.
72       If the info and gnutls programs are properly installed  at  your  site,
73       the command
74
75              info gnutls
76
77       should give you access to the complete manual.
78
79
80
81gnutls                             2.12.6.1                      gnutls_prf(3)
Impressum