Is TIpClientHttp supposed to work for secured sites?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

HGAutomator
Posts: 197
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF

Is TIpClientHttp supposed to work for secured sites?

Post by HGAutomator »

Hi,

TIpClientHttp connects to ordinary sites like google. But it hangs with a secured site.

So e.g., if you try

Code: Select all

Http_o := TIpClientHttp():New( "http://www.google.com" )

, there no issues.


but if you attempt to open https://harbour.github.io, thus:


Code: Select all

Http_o := TIpClientHttp():New( "https://harbour.github.io" )


, it hangs. The specific point that it hangs, is in httpcli.prg, at this line:

Code: Select all

::super:new( oUrl, iif( hb_defaultValue( xTrace, .F. ), "http", xTrace ), oCredentials )

The parent of TIpClientHttp is TIPClient.


I could try and rewrite this line, but wanted to confirm that I'm sending the right parameters (I tried sending a second parameters xTrace := .T.) to the constructor.
User avatar
danielmaximiliano
Posts: 2625
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Is TIpClientHttp supposed to work for secured sites?

Post by danielmaximiliano »

Hello: can you publish a small example since the HBTIP library does connect to the different secure sites such as HTTPs, FTPs, POP3s and SMTPs

Hola: puede usted publicar un pequeño ejemplo, ya que la libreria HBTIP si se conecta a los diferentes sitios seguros como HTTPs, FTPs, POP3s y SMTPs
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Is TIpClientHttp supposed to work for secured sites?

Post by serge_girard »

Try this:

In your HBC file

Code: Select all

inc=yes
head=native
libs=hbssl
libs=libeay32
libs=ssleay32
in your HBP file

Code: Select all

hbssl.hbc
Serge
There's nothing you can do that can't be done...
User avatar
danielmaximiliano
Posts: 2625
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Is TIpClientHttp supposed to work for secured sites?

Post by danielmaximiliano »

serge_girard wrote: Wed Jul 22, 2020 2:13 pm Try this:

In your HBC file

Serge
Hello, the browser has the ability to resolve ports and the way to encrypt the data through the SSL tunnel, investigating with a site that tests other sites indicates an error in the connection to a secure port 443
2020-07-22 12_48_01-examinator.png
2020-07-22 12_48_01-examinator.png (33.04 KiB) Viewed 3619 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
HGAutomator
Posts: 197
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF

Re: Is TIpClientHttp supposed to work for secured sites?

Post by HGAutomator »

Hi Daniel,

That was the example, above:

Code: Select all

Http_o := TIpClientHttp():New( "https://harbour.github.io" )
This connects with http servers, but hangs if it begins with https.

danielmaximiliano wrote: Wed Jul 22, 2020 1:47 pm Hello: can you publish a small example since the HBTIP library does connect to the different secure sites such as HTTPs, FTPs, POP3s and SMTPs

Hola: puede usted publicar un pequeño ejemplo, ya que la libreria HBTIP si se conecta a los diferentes sitios seguros como HTTPs, FTPs, POP3s y SMTPs
HGAutomator
Posts: 197
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF

Re: Is TIpClientHttp supposed to work for secured sites?

Post by HGAutomator »

Hi,

Ok thanks Serge, I'll give it a try.

What would be the command line, to use these hbc and hbp files? I had problems with those, and am just using a simple batch file, until I can figure out what was wrong my hb? files.


This is the command line that I'm using, at this stage of the project:

hbmk2 -b main.prg -oMain -ic:\minigui\Harbour\include -Lc:\hb32\contrib\hbtip -lhbmisc -Lc:\HWDebug -lhbtip -lhwgdebug


serge_girard wrote: Wed Jul 22, 2020 2:13 pm Try this:

In your HBC file

Code: Select all

inc=yes
head=native
libs=hbssl
libs=libeay32
libs=ssleay32
in your HBP file

Code: Select all

hbssl.hbc
Serge
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Is TIpClientHttp supposed to work for secured sites?

Post by serge_girard »

Sorry, but I don't use command line. Daniel or Edward? Or Claudio!

Serge
There's nothing you can do that can't be done...
HGAutomator
Posts: 197
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF

Re: Is TIpClientHttp supposed to work for secured sites?

Post by HGAutomator »

What tool are you using, that compiles with the .hb? files?

It doesn't have to be the command line, but I wasn't aware of any Make tool that integrates everything.

I mean, aside from the commercial xHarbour and Xailer IDEs, and Fivewin.
User avatar
danielmaximiliano
Posts: 2625
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Is TIpClientHttp supposed to work for secured sites?

Post by danielmaximiliano »

HGAutomator wrote: Thu Jul 23, 2020 4:08 pm What tool are you using, that compiles with the .hb? files?

It doesn't have to be the command line, but I wasn't aware of any Make tool that integrates everything.

I mean, aside from the commercial xHarbour and Xailer IDEs, and Fivewin.
Hello: only from the CMD command line adding the path where the harbour binaries are hosted to your PATH as indicated in the image.
you can compile your .prg by adding other configuration parameters or compile your .HBP'royect 'file, HBMK2 will automatically use the HBC'onfiguration' file with the same name
2020-07-23 13_53_28-Window.png
2020-07-23 13_53_28-Window.png (10.01 KiB) Viewed 3512 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Is TIpClientHttp supposed to work for secured sites?

Post by serge_girard »

HMG ide will compile

Serge
There's nothing you can do that can't be done...
Post Reply