[gnutls-devel] [PATCH 2/2] doc: Explain post-callback deallocation behavior for the SRP server callback

Attila Molnar attilamolnar at hush.com
Mon Jun 16 20:57:37 CEST 2014


>From fbdf93364366409239cf3c396db9b10aba17f944 Mon Sep 17 00:00:00 2001
From: Attila Molnar <attilamolnar at hush.com>
Date: Mon, 16 Jun 2014 18:10:09 +0200
Subject: [PATCH 2/2] doc: Explain post-callback deallocation behavior for the
 SRP server callback

Signed-off-by: Attila Molnar <attilamolnar at hush.com>
---
 lib/gnutls_srp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/gnutls_srp.c b/lib/gnutls_srp.c
index 0423435..fb7c083 100644
--- a/lib/gnutls_srp.c
+++ b/lib/gnutls_srp.c
@@ -624,6 +624,11 @@ gnutls_srp_set_server_credentials_file(gnutls_srp_server_credentials_t res,
  * in using the gnutls_malloc(). For convenience @prime and @generator
  * may also be one of the static parameters defined in gnutls.h.
  *
+ * Initially, the data field is NULL in every #gnutls_datum_t
+ * structure that the callback has to fill in. When the
+ * callback is done GnuTLS deallocates all of those buffers
+ * which are non-NULL, regardless of the return value.
+ *
  * In order to prevent attackers from guessing valid usernames,
  * if a user does not exist, g and n values should be filled in
  * using a random user's parameters. In that case the callback must
-- 




More information about the Gnutls-devel mailing list