ERROR: SSL handshake failed: DH lib - WeOnlyDo Discussion board

ERROR: SSL handshake failed: DH lib (wodWebServer / wodWebServer.NET)

by mark, Friday, January 23, 2009, 23:45 (5781 days ago)

Hello,

I am having a problem with an SSL handshake. The error only happens when I try to goto the website thru a socks4 proxy. It connects to the proxy. Sends the first packet and recieves the Z responce. When it tries to send the first packet that it would normally do when just connecting to the server it will respond with 'SSL handshake failed: DHlib' Here is the code I am using. I am using vb6.

frmMain.wodSSL(Index).ProxyHostname = sHTTP(Index).sProxyHost
frmMain.wodSSL(Index).ProxyPort = sHTTP(Index).iProxyPort
frmMain.wodSSL(Index).ProxyType = ProxySocks4
frmMain.wodSSL(Index).ProxyAuthentication = AuthNone

frmMain.wodSSL(Index).Request.Headers.RemoveAll
frmMain.wodSSL(Index).Request.Headers.Add Host , sHTTP(Index).sHOST
frmMain.wodSSL(Index).HostName = sHTTP(Index).sHOST

frmMain.wodSSL(Index).Secure = ProtTLS1

frmMain.wodSSL(Index).AutoRedirect = False
frmMain.wodSSL(Index).HTTPversion = HTTP/1.1

frmMain.wodSSL(Index).Request.URI = sHTTP(Index).sURL '/get.php

If sHTTP(Index).sAccept > Then frmMain.wodSSL(Index).Request.Accept = sHTTP(Index).sAccept

If sHTTP(Index).sPOST > Then
frmMain.wodSSL(Index).Request.Headers.Add Content-Type , application/x-www-form-urlencoded
frmMain.wodSSL(Index).Request.Body = sHTTP(Index).sPOST
End If

frmMain.wodSSL(Index).Request.UserAgent = sHTTP(Index).sUserAgent
If sHTTP(Index).sReferer > Then frmMain.wodSSL(Index).Request.Referer = sHTTP(Index).sReferer
If sHTTP(Index).sCookie > Then frmMain.wodSSL(Index).Request.Headers.Add Cookie , sHTTP(Index).sCookie

frmMain.wodSSL(Index).Request.Headers.Add Connection , Close
frmMain.wodSSL(Index).KeepAlive = Never

If sHTTP(Index).sPOST > Then
frmMain.wodSSL(Index).Post

Else
frmMain.wodSSL(Index).Get

End If

Re: ERROR: SSL handshake failed: DH lib

by mark, Friday, January 23, 2009, 23:48 (5781 days ago) @ mark

frmMain.wodSSL(Index).ProxyHostname = 198.110.164.4
frmMain.wodSSL(Index).ProxyPort = 443
frmMain.wodSSL(Index).ProxyType = ProxySocks4
frmMain.wodSSL(Index).ProxyAuthentication = AuthNone

Should work for a socks4 proxy.

Re: ERROR: SSL handshake failed: DH lib

by woddrazen, Saturday, January 24, 2009, 00:02 (5781 days ago) @ mark

Hi Mark,


Are you sure you send us correct proxy server information?

Here is code I try:
[code]http1.Blocking = True
http1.ProxyHostname = 198.110.164.4
http1.ProxyPort = 443
http1.ProxyType = ProxySocks4
http1.ProxyAuthentication = AuthNone
http1.Connect[/code]

When I execute that code I receive this error:

Proxy server rejected supplied login credentials.

Can you please check this out and let us know how can we connect there?

Also maybe you can send us site you are connecting though proxy. So we can duplicate your problem on our side.

Let us know how it goes.


Regards,
Drazen

Re: ERROR: SSL handshake failed: DH lib

by mark, Saturday, January 24, 2009, 00:30 (5781 days ago) @ woddrazen

Here try this.

Private Sub Command1_Click()


http1.ProxyHostname = 198.110.164.4
http1.ProxyPort = 443
http1.ProxyType = ProxySocks4


http1.Request.Headers.RemoveAll
http1.Request.Headers.Add Host , www.paypal.com
http1.HostName = www.paypal.com

http1.Secure = ProtTLS1

http1.AutoRedirect = False
http1.HTTPversion = HTTP/1.1

http1.Request.URI = /


http1.Request.UserAgent = Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.05 [en]

http1.Request.Headers.Add Connection , Close
http1.KeepAlive = Never

http1.Get


End Sub


Private Sub http1_Done(ByVal ErrorCode As Long, ByVal ErrorText As String)
On Error Resume Next


On Error Resume Next

If ErrorCode = 0 Then
Debug.Print done right

Else
Debug.Print ERROR: & ErrorText
Exit Sub
End If

Debug.Print http1.Response.Body

End Sub

Private Sub http1_StateChange(ByVal OldState As wodHttpDLXLibCtl.HttpStates)

Debug.Print State changed to & http1.StateString(http1.State) & (old state was & http1.StateString(OldState) & )

End Sub

Re: ERROR: SSL handshake failed: DH lib

by mark, Saturday, January 24, 2009, 00:37 (5781 days ago) @ mark

Here is the packets that are sents and recieved before the error.

1 218.61.22.13:2775 198.110.164.4:443 10 Send
0000 04 01 01 BB 40 04 F1 31 00 00 ....@..1..

2 198.110.164.4:443 218.61.22.13:2775 8 Recv
0000 00 5A 01 BB 40 04 F1 31 .Z..@..1

3 218.61.22.13:2775 198.110.164.4:443 102 Send
0000 16 03 01 00 61 01 00 00 5D 03 01 49 7B 34 F1 BF ....a...]..I{4..
0010 47 AD 72 16 4A FF 3B 38 71 63 4B 95 5C 71 FB 22 G.r.J.;8qcK.q.
0020 1C D7 88 25 B1 23 05 EF A6 19 07 00 00 36 00 39 ... .#.......6.9
0030 00 38 00 35 00 16 00 13 00 0A 00 33 00 32 00 2F .8.5.......3.2./
0040 00 07 00 66 00 05 00 04 00 63 00 62 00 61 00 15 ...f.....c.b.a..
0050 00 12 00 09 00 65 00 64 00 60 00 14 00 11 00 08 .....e.d.`......
0060 00 06 00 03 01 00 ......

Re: ERROR: SSL handshake failed: DH lib

by wodDamir, Saturday, January 24, 2009, 15:17 (5780 days ago) @ mark

Hi Mark,

I believe I duplicated this behaviour. However, if I switch to Socks5 is works like a charm, so I'm not really sure if it's problem with the component, since Mozilla has problem of displaying the same page thru Socks4 (displays fine with Socks5).

I've sent this to our programmers to check what exactly happens. We will inform you as soon as we know more on this.

Regards,
Damba

Re: ERROR: SSL handshake failed: DH lib

by wodSupport, Saturday, January 24, 2009, 23:51 (5780 days ago) @ wodDamir

I believe this is now fixed, can you request update and try with latest version?

Regards,
Kreso

Re: ERROR: SSL handshake failed: DH lib

by mark, Monday, January 26, 2009, 22:20 (5778 days ago) @ wodSupport

It works now. Thanks.