PSK examples

Giuseppe Scrivano gscrivano at gnu.org
Wed May 25 18:33:08 CEST 2011


Hello,

I have tried to set up a connection using PSK but I get this error
message all the time:

*** Fatal error: A TLS fatal alert has been received.
*** Received alert [40]: Handshake failed
*** Handshake has failed
GnuTLS error: A TLS fatal alert has been received.

I took the examples from the documentation.

the server:

gnutls-serv -d 10 --pskpasswd psks.txt  \
   --pskhint psk_identity_hint


the client:

gnutls-cli -p 5556 localhost --pskusername psk_identity \
      --pskkey key

(where epsk_identity and key are the same as in the psks.txt file)

I have also tried to use "--priority +PSK:+DHE-PSK" both for the client
and for the server without any difference.

Do you have any idea?  What am I missing?

As proof that I have read the documentation, I have attached a small patch.

Thanks,
Giuseppe



>From 009ccba073016787084a28047b633841d6784e54 Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <gscrivano at gnu.org>
Date: Wed, 25 May 2011 18:28:11 +0200
Subject: [PATCH] Fix example in the documentation.

---
 ChangeLog             |    5 +++++
 doc/cha-programs.texi |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1ec8d74..faa93fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-25  Giuseppe Scrivano  <gscrivano at gnu.org>
+
+	* doc/cha-programs.texi (Example server PSK connection): Remove
+	non existing command line option.
+
 2011-04-09  Nikos Mavrogiannopoulos <nmav at gnutls.org>
 
 	* .gitignore, doc/cha-gtls-app.texi, doc/cha-intro-tls.texi,
diff --git a/doc/cha-programs.texi b/doc/cha-programs.texi
index 8b9aea5..3fa1575 100644
--- a/doc/cha-programs.texi
+++ b/doc/cha-programs.texi
@@ -760,7 +760,7 @@ password file (@pxref{Invoking psktool}).  In the example below, I
 type @code{password} at the prompt.
 
 @smallexample
-$ ./psktool -u psk_identity -p psks.txt -n psk_identity_hint
+$ ./psktool -u psk_identity -p psks.txt
 Enter password:
 Key stored to psks.txt
 $ cat psks.txt
-- 
1.7.5.1





More information about the Gnutls-devel mailing list