Page 2 of 3
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Thu Oct 18, 2012 8:36 am
by Enrico Maria Giordano
I get the same error using xHarbour. Unfortunately, the https protocol is not supported by tip.lib.
EMG
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Thu Oct 18, 2012 8:37 am
by Enrico Maria Giordano
TimStone wrote:Computers need to rattle our cages.
Can you explain this phrase, please?
EMG
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Thu Oct 18, 2012 2:21 pm
by TimStone
Enrico,
Using xHarbour.com I have no problem with this class. My older version has been executing it,. as written, just fine. Its the Harbour with MSVC that is having a problem.
When I look at the harbor source code, it would appear that https IS supported.
That little line about computers is "humor". It means that when a computer has the opportunity, it will make problems for us ! "Rattle our cages" means that something, or someone, likes to do something we don't want, or expect.
Tim
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Thu Oct 18, 2012 2:36 pm
by Enrico Maria Giordano
TimStone wrote:Using xHarbour.com I have no problem with this class.
This only mean that xHarbour.com has implemented https protocol support. Official xHarbour has not.
TimStone wrote:That little line about computers is "humor". It means that when a computer has the opportunity, it will make problems for us ! "Rattle our cages" means that something, or someone, likes to do something we don't want, or expect.
Thank you!
EMG
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Thu Oct 18, 2012 2:45 pm
by TimStone
I'm using an older version of xHarbour.com.
I have two builds of my primary application. One is with the older xHarbour and the other with MSVC 2010 / Harbour. We have resolved every problem with the new one except this issue.
I can certainly consider an alternative, but I don't see there is one.
Any suggestions would be greatly appreciated. I cannot distribute these newer applications until I can get this xml interaction working.
Tim
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Thu Oct 18, 2012 2:49 pm
by Enrico Maria Giordano
Sorry, I don't use Harbour.
EMG
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Thu Oct 18, 2012 3:08 pm
by modicr
Maybe you can use Wininet or WinHTTP API:
http://www.codeproject.com/Articles/389 ... ing-Wininehttp://www.codeproject.com/Articles/666 ... apper-in-CTimStone wrote:I'm using an older version of xHarbour.com.
I have two builds of my primary application. One is with the older xHarbour and the other with MSVC 2010 / Harbour. We have resolved every problem with the new one except this issue.
I can certainly consider an alternative, but I don't see there is one.
Any suggestions would be greatly appreciated. I cannot distribute these newer applications until I can get this xml interaction working.
Tim
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Thu Oct 18, 2012 3:50 pm
by ADutheil
You might try to adapt the function below to your needs. It is based on a sample from Harbour SVN.
- Code: Select all Expand view
FUNCTION Test
LOCAL socket, ssl_ctx, buffer, tmp, ssl
hb_inetInit()
socket := hb_inetCreate()
hb_inetTimeout( socket, 2500 )
hb_inetConnect( "www.fortify.net", 443, socket )
IF hb_inetErrorCode( socket ) = 0
SSL_INIT()
ssl_ctx := SSL_CTX_NEW()
ssl := SSL_NEW( ssl_ctx )
hb_inetFD( socket )
SSL_SET_FD( ssl, hb_inetFD( socket ) )
tmp := SSL_CONNECT( ssl )
IF SSL_GET_ERROR( ssl, tmp ) = 0 // Everything OK
tmp := SSL_WRITE( ssl, "GET / http/1.1" + CRLF + "Host: " + "www.fortify.net" + CRLF + CRLF )
IF SSL_GET_ERROR( ssl, tmp ) = 0 // Everything OK
buffer := Space( 1024 )
tmp := SSL_READ( ssl, @buffer )
IF SSL_GET_ERROR( ssl, tmp ) = 0 // Everything OK
msginfo( buffer )
ENDIF
ELSE
msgStop( "SSL_WRITE ERROR" )
ENDIF
ELSE
msgStop( "SSL_CONNECT ERROR" )
ENDIF
hb_inetClose( socket )
ELSE
msgStop( "UNABLE TO CONNECT!" )
ENDIF
I linked ssleay32 libeay32 hbssl
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Thu Oct 18, 2012 4:31 pm
by ADutheil
Hi Tim,
It´s working now, at least I can browse the oHttp object. Download the updated libs from
ftp://dutheil.dyndns-server.com/libs.zip- Code: Select all Expand view
FUNCTION Test2
LOCAL oHttp := TIpClientHTTP():new( "https://www.fortify.net", .F. )
IF .NOT. oHttp:open() // Open the connection
MsgAlert( "Connection error:", oHttp:lastErrorMessage( ) )
ELSE
XBROWSE( oHttp )
ENDIF
RETURN ( NIL )
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Thu Oct 18, 2012 6:18 pm
by TimStone
Could you email me your make file section with the libs you are including, and in what order. I'm wondering if I have a conflict.
"TimStone@MasterLinkSoftware.com"
Thanks
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Sat Oct 20, 2012 12:22 am
by TimStone
Thanks to Andre who revised the libraries and they now work !
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Sat Oct 20, 2012 7:11 am
by Enrico Maria Giordano
Great! Can I have the new lib? I would try it with xHarbour but the link is not working anymore.
EMG
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Sat Oct 20, 2012 12:18 pm
by ADutheil
Libs are available at:
https://www.box.com/s/6sm1zzxuwvlwokji6nos They were built from HARBOUR svn:
Harbour Build Info
---------------------------
Version: Harbour 3.2.0dev (Rev. 18349)
Compiler: Microsoft Visual C++ 16.0.30319 (32-bit)
Platform: Windows 7 6.1.7601 Service Pack 1
PCode version: 0.3
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Sat Oct 20, 2012 12:32 pm
by Enrico Maria Giordano
Sorry, can I have the source code, please?
EMG
Re: xHB TipClientHTTP( ) substitute ?
Posted:
Sat Oct 20, 2012 1:20 pm
by ADutheil
You can download the source from:
https://www.box.com/s/onitle3ibdp6z66e15z0They came from HARBOUR svn. My ENV vars are:
- Code: Select all Expand view
SET HB_TIP_OPENSSL=yes
SET HB_HAS_OPENSSL=yes
SET HB_STATIC_OPENSSL=yes
SET HB_WITH_CURL=e:\libcurl-7.19.3-win32-ssl-msvc\include
SET HB_WITH_OPENSSL=E:\OpenSSL-Win32\include\
I built the hbtipssl lib running hbmk2 inside the hbtip directory with para -IYourSourceDirectory\hbssl