Debugging SSL connection problems?

Discussion to talk about software related topics only.
Post Reply
PaulC
Posts: 1
Joined: Wed Jun 05, 2013 4:58 pm

Debugging SSL connection problems?

Post by PaulC »

I'm having a problem where a call to SSL_connect() fails to establish a connection to some servers with the error: SSL_ERROR_FAILED_NEGOTIATION

So for example, this will fail when I run it on my PK70:

Code: Select all

IPADDR serverIP;
int resp = GetHostByName( "www.netburner.com", &serverIP, 0, TICKS_PER_SECOND*2 );

if (resp==DNS_OK)
{
   int fds = SSL_connect( serverIP, 0, 443, TICKS_PER_SECOND*4, 0 );
   iprintf( "Response = %d", fds );
}
However, if I change the server to something like www.google.com it works fine. So my question is: how would I go about tracking down this error? There doesn't seem to be any detailed debugging information available from the SSL library -?

Note: I have certificate checking disabled (ie: NB_SSL_CLIENT_CERTIFICATE_CHECKING_ENABLED is undefined).

It also works fine from my PC (ie: curl -k -v https://www.netburner.com)


Any suggestions would be much appreciated!
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Debugging SSL connection problems?

Post by rnixon »

I believe wireshark can be used to determine what is going on. If a certificate is involved, you can even refer to it in wireshark and it will do the decoding.
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Debugging SSL connection problems?

Post by rnixon »

Is the code you posted really what you are running? Are you trying to make a ssl connection to www.netburner.com? How do you know that is even supported by that web site?
Post Reply