0

I'm running the command

gnutls-cli -s facebook.com -p 443 --x509cafile /etc/ssl/certs/ca-certificates.crt -d 999

and the output is

|<2>| p11: loaded provider 'p11-kit-trust'
|<2>| p11: loaded provider 'gnome-keyring'
|<2>| ASSERT: pkcs11.c:425
Processed 164 CA certificate(s).
Resolving 'facebook.com'...
Connecting to '173.252.120.6:443'...
|<4>| REC[0x872bac8]: Allocating epoch #0

- Simple Client Mode:

and then a blinking cursor, it just hangs there. Using strace, I see that after several lines of code are executed, it reaches a point where it just prints

select(6, [0 5], NULL, NULL, {0, 50000}) = 0 (Timeout)

Over and over and over again. I tried upgrading gnutls to 3.1.23, but the result is the same. Running it as root doesn't change the outcome.

As a sanity check, I also ran:

openssl s_client -connect facebook.com:443 -CAfile /etc/ssl/certs/ca-certificates.crt

and it does create a successful ssl connection. Does anyone know why gnutls-cli may be doing this... or what I can do to make it not do this? I'm trying to debug a larger issue and I think it maybe directly related to this...

Ubuntu 14.04
gnutls-cli 3.1.23

2 Answers 2

2

You command line is wrong. Instead of

 gnutls-cli -s facebook.com -p 443 --x509cafile /etc/ssl/certs/ca-certificates.crt -d 999

it must be

 gnutls-cli -p 443 --x509cafile /etc/ssl/certs/ca-certificates.crt -d 999 facebook.com

See usage:

Usage:  gnutls-cli [options] hostname
...
 -s, --starttls           Connect, establish a plain session and 
                          start TLS when EOF or a SIGALRM is 
                          received.

So it actually established a plain connection and waited for EOF from the terminal and only after that it would start with the SSL handshake.

0
0

Try the following: Provide gnutls-cli with input from stdin, e.g. by prefixing is with a piping true:

true | gnutls-cli -s facebook.com -p 443 --x509cafile /etc/ssl/certs/ca-certificates.crt -d 999

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .