help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gnutls] gnutls_handshake fails with an alert


From: Sam Varshavchik
Subject: [Help-gnutls] gnutls_handshake fails with an alert
Date: Sat, 20 Oct 2007 16:25:45 -0400

I've taken the "Simple client example" from the 1.6.3 pages, and supplied a tcp_connect() that connects to ssl-enabled apache on localhost. Running the code results in:

*** Handshake failed
GNUTLS ERROR: A TLS fatal alert has been received.

My apache SSL config works fine (with a self-signed cert). Just to eliminate the self-signed cert being a factor, I also tried and got the same results with mail.google.com on port 443 (gmail over https).

I can see from strace that the alert seems to be genuine. After a:

connect(4, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("127.0.0.1")}, 16) = 0

… it looks like I'm sending a record, and receiving a small alert in response:

sendto(4, "\26\3\1\0001\1\0\0-\3\1G\32c918\23Ul\t\366c\22l76\254\335\4\254\273"…, 54, 0, NULL, 0) = 54
recvfrom(4, "\25\3\1\0\2", 5, 0, NULL, NULL) = 5
recvfrom(4, "\2(", 2, 0, NULL, NULL)    = 2
write(2, "*** Handshake failed\n", 21*** Handshake failed

But I'm only using the simple client example, from the info pages, as is, so what's going wrong here?

Attachment: pgpeO3JnvlbRa.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]