Recent

Author Topic: https with lazarus  (Read 7639 times)

seivtcho

  • New Member
  • *
  • Posts: 15
https with lazarus
« on: February 03, 2018, 06:59:04 pm »
Hello! How can I get the HTML code of a web page, that is https ? The synapse HttpGetText is not working with https.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: https with lazarus
« Reply #1 on: February 04, 2018, 10:01:27 am »

Thaddy

  • Hero Member
  • *****
  • Posts: 14198
  • Probably until I exterminate Putin.
Re: https with lazarus
« Reply #2 on: February 04, 2018, 12:28:33 pm »
Hello! How can I get the HTML code of a web page, that is https ? The synapse HttpGetText is not working with https.

Why not? Here it works. ..?  Did you forget to include ssl_openssl or ssl_cryptlib in the (project) uses clause? did you forget to install either openssl or cryptlib?
I am using openssl. The architecture of synapse is such that you only have to include ssl_openssl (or if you prefer:ssl_cryptlib) to the uses clause and it works transparently.
« Last Edit: February 04, 2018, 12:40:08 pm by Thaddy »
Specialize a type, not a var.

seivtcho

  • New Member
  • *
  • Posts: 15
Re: https with lazarus
« Reply #3 on: February 08, 2018, 08:52:33 pm »
Thank you people! But I am still in the nothing :)
I red the http://wiki.freepascal.org/Synapse#SSL.2FTLS_support
and I downloaded the link:
http://synapse.ararat.cz/files/crypt/
unzipped it, ant there were no .pas files inthere. How exactly can I use it with Lazarus?

I included  the ssl_openssl in the uses section and the problem persisted... So i included also  ssl_cryptlib, and it gave me an error
"Can not find unit cryptlib used by ssl_cryptlib"

rvk

  • Hero Member
  • *****
  • Posts: 6110
Re: https with lazarus
« Reply #4 on: February 08, 2018, 08:56:47 pm »
Don't include ssl_cryptlib in your uses. Just only include ssl_openssl.
(only use ssl_cryptlib if you know what you are doing)

Did you put the openssl dll's in your programs directory?
If so, did you make sure to match the bitness (32 bit dlls for 32 program or 64 but dlls for 64 bit program)?

bigeno

  • Sr. Member
  • ****
  • Posts: 266
Re: https with lazarus
« Reply #5 on: February 08, 2018, 11:11:00 pm »
include ssl_openssl in uses clausule and copy libeay32.dll, ssleay32.dll from Openssl-0.9.8d-Win32.zip
thats all.
oh. and include openssl licence in your project ;)

rvk

  • Hero Member
  • *****
  • Posts: 6110
Re: https with lazarus
« Reply #6 on: February 08, 2018, 11:16:25 pm »
include ssl_openssl in uses clausule and copy libeay32.dll, ssleay32.dll from Openssl-0.9.8d-Win32.zip
thats all.
Or Openssl-0.9.8d-Win64.zip if your applicationis 64 bit !!

I also would advice to get a newer openssl version. I recently had problems with 0.9.8 in combination with an upgraded web-server.

Just take the latest from https://indy.fulgan.com/SSL/
Just make sure to match the bitness like I said.

kupferstecher

  • Hero Member
  • *****
  • Posts: 583
Re: https with lazarus
« Reply #7 on: February 08, 2018, 11:54:21 pm »
Is it possible to link OpenSSL statically (for Windows/Linux)?

The license would allow it, if I understand it correctly.

seivtcho

  • New Member
  • *
  • Posts: 15
Re: https with lazarus
« Reply #8 on: February 09, 2018, 07:18:44 am »
Workeddd :) hehe
What worked for me was indeed to include the openssl in the uses section,  to copy the libeay32.dll and the ssleay32.dll in the project folder, and then to build the entire project again.
Thanks to everybody!
You all contributed to my code.

 

TinyPortal © 2005-2018