2

I have a problem with libcurl returning an SSL error, let me describe the situation:

There are two machines with Debian, the client is Debian 7 and the server is Debian 9, the client uses libcurl to send HTTP request via C code (both machines are local so I have CURLOPT_SSL_VERIFYHOST and CURLOPT_SSL_VERIFYPEER set to false on the client) and there is a PHP script on the server that the request is directed at. After every try I'm getting an SSL connection error :

gnutls_handshake() failed: A TLS fatal alert has been received

even though I can get the response with no problem using curl on the command line with -k.

Worth noting is the fact, that everything seems to not be working only if serves is deb9 and client is deb7. So:

  • debian7 server debian7 client - works
  • debian7 server debian9 client - works
  • debian9 server debian9 client - works
  • debian9 server debian7 client - doesn't work
  • Can you debug the PHP? – eyoung100 Oct 3 '18 at 7:02
  • Sorry I'm new to this, how do I do that exactly? The php code only connects to database and inserts some values – TesterV Oct 3 '18 at 7:12
  • 1
    SSLv3 has been deprecated, could be it? – Rui F Ribeiro Oct 3 '18 at 7:48
  • 1
    @RuiFRibeiro I didn't write it, but the OP can pass a TLS version in the curl command. – eyoung100 Oct 3 '18 at 8:08
  • 2
    Problem resolved, turnes out i needed to recompile curl to use openssl instead of gnutls because nginx no longer supports gnutls, now everything works like a charm :) – TesterV Oct 3 '18 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.