From e506c4a1a421292dc3d5e6eba7f61f76df25e1e7 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 27 Feb 2012 17:40:38 +0100 Subject: [PATCH] Updated documentation on gnutls_prf() --- doc/cha-gtls-app.texi | 9 +++++---- lib/gnutls_state.c | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/cha-gtls-app.texi b/doc/cha-gtls-app.texi index 9319f640f..c02f09570 100644 --- a/doc/cha-gtls-app.texi +++ b/doc/cha-gtls-app.texi @@ -1082,9 +1082,10 @@ an alternative interface is available using a callback function. @cindex keying material exporters @cindex exporting keying material -The TLS PRF can be used by other protocols to derive data. The API to -use is @funcref{gnutls_prf}. The function needs to be provided with the -label in the parameter @code{label}, and the extra data to mix in the +The TLS PRF can be used by other protocols to derive keys based on +the TLS master secret. The API to use is @funcref{gnutls_prf}. The +function needs to be provided with the label in the parameter +@code{label}, and the extra data to mix in the @code{extra} parameter. Depending on whether you want to mix in the client or server random data first, you can set the @code{server_random_first} parameter. @@ -1100,7 +1101,7 @@ rc = gnutls_prf (session, strlen (MYLABEL), MYLABEL, 0, strlen (MYCONTEXT), MYCONTEXT, 32, out); @end example -If you don't want to mix in the client/server random, there is a more +If you don't want to mix in the client/server random, there is a low-level TLS PRF interface called @funcref{gnutls_prf_raw}. @node Channel Bindings diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c index a8d8f0edc..c8773c466 100644 --- a/lib/gnutls_state.c +++ b/lib/gnutls_state.c @@ -977,8 +977,8 @@ _gnutls_PRF (gnutls_session_t session, * @outsize: size of pre-allocated output buffer to hold the output. * @out: pre-allocate buffer to hold the generated data. * - * Apply the TLS Pseudo-Random-Function (PRF) using the master secret - * on some data. + * Apply the TLS Pseudo-Random-Function (PRF) on the master secret + * and the provided data. * * The @label variable usually contain a string denoting the purpose * for the generated data. The @seed usually contain data such as the @@ -1024,8 +1024,8 @@ gnutls_prf_raw (gnutls_session_t session, * @outsize: size of pre-allocated output buffer to hold the output. * @out: pre-allocate buffer to hold the generated data. * - * Apply the TLS Pseudo-Random-Function (PRF) using the master secret - * on some data, seeded with the client and server random fields. + * Apply the TLS Pseudo-Random-Function (PRF) on the master secret + * and the provided data, seeded with the client and server random fields. * * The @label variable usually contain a string denoting the purpose * for the generated data. The @server_random_first indicate whether -- 2.11.4.GIT