[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gnutls branch, master, updated. gnutls_3_0_13-96-g96afb81
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU gnutls branch, master, updated. gnutls_3_0_13-96-g96afb81 |
Date: |
Fri, 02 Mar 2012 18:33:01 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".
http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=96afb81b14d5947c1f728cf6bf5df7fe641261af
The branch, master has been updated
via 96afb81b14d5947c1f728cf6bf5df7fe641261af (commit)
via 699a139b853b232d644c3165b003bed71fa582f5 (commit)
via 45f339d9f5dbc4ca0fd6a4567f6791d91b2fb21b (commit)
via 86fff694b73753f66ff1c871a5ac4e31448522fb (commit)
from 5365dd74dac5eeb1097cff3527b4720becdc34c9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 96afb81b14d5947c1f728cf6bf5df7fe641261af
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Fri Mar 2 19:32:59 2012 +0100
Corrected PSK client example.
commit 699a139b853b232d644c3165b003bed71fa582f5
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Fri Mar 2 19:23:25 2012 +0100
Added missing files.
commit 45f339d9f5dbc4ca0fd6a4567f6791d91b2fb21b
Author: Carolin Latze <address@hidden>
Date: Fri Mar 2 16:29:08 2012 +0100
supp data doc added
Signed-off-by: Nikos Mavrogiannopoulos <address@hidden>
commit 86fff694b73753f66ff1c871a5ac4e31448522fb
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Fri Mar 2 19:07:00 2012 +0100
released 3.0.15
-----------------------------------------------------------------------
Summary of changes:
NEWS | 2 +-
doc/cha-internals.texi | 95 ++++++++++++++++++++++++++++++++++++++++++
doc/examples/ex-client-psk.c | 2 +-
tests/srp/Makefile.am | 2 +
4 files changed, 99 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index 87df90e..9e9122f 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@ GnuTLS NEWS -- History of user-visible changes.
-*- outline -*-
Copyright (C) 2000-2012 Free Software Foundation, Inc.
See the end for copying conditions.
-* Version 3.0.15 (unreleased)
+* Version 3.0.15 (released 2012-03-02)
** test suite: Only run under valgrind in the development
system (the full git repository)
diff --git a/doc/cha-internals.texi b/doc/cha-internals.texi
index 0f05935..6d7ca5c 100644
--- a/doc/cha-internals.texi
+++ b/doc/cha-internals.texi
@@ -321,6 +321,101 @@ When writing GTK-DOC style documentation for your new
APIs, don't
forget to add @code{Since:} tags to indicate the GnuTLS version the
API was introduced in.
address@hidden Adding a new Supplemental Data Handshake Message
+
+TLS handshake extensions allow to send so called supplemental data
+handshake messages. This short section explains how to implement a
+supplemental data handshake message for a given TLS extension.
+
+First of all, modify your extension @code{foobar} in the way, the that
+flags
address@hidden>security_parameters.do_send_supplemental}
+and
address@hidden>security_parameters.do_recv_supplemental}
+are set:
+
address@hidden
+int
+_gnutls_foobar_recv_params (gnutls_session_t session, const opaque * data,
+ size_t _data_size)
address@hidden
+ ...
+ session->security_parameters.do_recv_supplemental=1;
+ ...
address@hidden
+
+int
+_gnutls_foobar_send_params (gnutls_session_t session, gnutls_buffer_st
*extdata)
address@hidden
+ ...
+ session->security_parameters.do_send_supplemental=1;
+ ...
address@hidden
address@hidden example
+
+Furthermore add the functions @funcintref{_foobar_supp_recv_params}
+and @funcintref{_foobar_supp_send_params} to @code{_foobar.h} and
address@hidden The following example code shows how to send a
+``Hello World'' string in the supplemental data handshake message:
+
address@hidden
+int
+_foobar_supp_recv_params(gnutls_session_t session,const opaque *data,size_t
_data_size)
address@hidden
+ uint8_t len = (int) _data_size;
+ unsigned char *msg;
+
+ msg = (unsigned char *)malloc(len*sizeof(unsigned char));
+ memcpy(msg,data,len);
+ msg[len]='\0';
+
+ return len;
address@hidden
+
+int
+_foobar_supp_send_params(gnutls_session_t session,gnutls_buffer_st *buf)
address@hidden
+ unsigned char *msg = "hello world";
+ int len = strlen(msg);
+
+ _gnutls_buffer_append_data_prefix(buf,8,msg,(uint8_t) len);
+
+ return len;
address@hidden
address@hidden example
+
+Afterwards, add the new supplemental data handshake message to
address@hidden/gnutls_supplemental.c} by adding a new entry to the
address@hidden structure:
+
address@hidden
+gnutls_supplemental_entry _gnutls_supplemental[] =
address@hidden
+ @{"foobar",
+ GNUTLS_SUPPLEMENTAL_FOOBAR_DATA,
+ _foobar_supp_recv_params,
+ address@hidden,
+ @{0, 0, 0, address@hidden
address@hidden;
address@hidden example
+
+You have to include your @code{foobar.h} header file as well:
+
address@hidden
+#include "foobar.h"
address@hidden example
+
+Lastly, add the new supplemental data type to
address@hidden/includes/gnutls/gnutls.h}:
+
address@hidden
+typedef enum
address@hidden
+ GNUTLS_SUPPLEMENTAL_USER_MAPPING_DATA = 0,
+ GNUTLS_SUPPLEMENTAL_FOOBAR_DATA = 1
address@hidden gnutls_supplemental_data_format_type_t;
address@hidden example
+
@node Cryptographic Backend
@section Cryptographic Backend
Today most new processors, either for embedded or desktop systems
diff --git a/doc/examples/ex-client-psk.c b/doc/examples/ex-client-psk.c
index f8e7207..63366c2 100644
--- a/doc/examples/ex-client-psk.c
+++ b/doc/examples/ex-client-psk.c
@@ -43,7 +43,7 @@ main (void)
gnutls_init (&session, GNUTLS_CLIENT);
/* Use default priorities */
- ret = gnutls_priority_set_direct (session, "PERFORMANCE", &err);
+ ret = gnutls_priority_set_direct (session,
"PERFORMANCE:+ECDHE-PSK:+DHE-PSK:+PSK", &err);
if (ret < 0)
{
if (ret == GNUTLS_E_INVALID_REQUEST)
diff --git a/tests/srp/Makefile.am b/tests/srp/Makefile.am
index 849b1d9..eb4f523 100644
--- a/tests/srp/Makefile.am
+++ b/tests/srp/Makefile.am
@@ -19,6 +19,8 @@
# along with this file; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+EXTRA_DIST = tpasswd tpasswd.conf
+
AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir)/tests \
hooks/post-receive
--
GNU gnutls
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gnutls branch, master, updated. gnutls_3_0_13-96-g96afb81,
Nikos Mavrogiannopoulos <=