Recent

Author Topic: [SOLVED] Linux, Synapse and SSL - How to distribute an application?  (Read 4237 times)

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All

I'm developing an application on a Mac, and would like to give Windows and Linux users access to this as well.

Under Linux (GTK2), I'm using Synapse (r209 - trunk) and OpenSSL to retrieve certain JSON files by using https:// etc.
From a previous (old) post I found that I need to install the "libssl-dev package" with apt-get to get this working and to avoid the dreaded "SSL/TLS support is not compiled" message.
After that, in the dev environment, this works great - just not on a clean Linux setup (with regular OpenSSL installed - not the dev files).


Now, how do I distribute an application like this? The plan/idea is to just have a user download an archive from a website.
I'm not a Linux user, so I'm not sure if users are used to installing libssl-dev manually or if it is even needed.
I understand that just copying libssl.so and libcrypto.so won't do any good either since Linux would ignore them anyway.
Note that on the fresh (Ubuntu based) Linux distro, LibSSL (libssl3.so?) is installed, but I cannot seem to find libcrypto.so and am wondering if libssl.so and libssl3.so can be used mixed.
Attempting to make sure OpenSSL is installed I did:


Code: Pascal  [Select][+][-]
  1. $ sudo apt-get install openssl
  2. Reading package lists... Done
  3. Building dependency tree      
  4. Reading state information... Done
  5. openssl is already the newest version (1.1.0g-2ubuntu4.1).
  6. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


What is the "usual" procedure (aside from making a package with dependencies etc)? Or what am I doing wrong?
« Last Edit: October 01, 2018, 04:00:12 pm by Hansaplast »

Thaddy

  • Hero Member
  • *****
  • Posts: 14210
  • Probably until I exterminate Putin.
Re: Linux, Synapse and SSL - How to distribute an application?
« Reply #1 on: September 19, 2018, 04:10:50 pm »
On Linux openssl is likely to
 be installed. Otherwisr you can link statically.
« Last Edit: September 19, 2018, 04:13:19 pm by Thaddy »
Specialize a type, not a var.

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Linux, Synapse and SSL - How to distribute an application?
« Reply #2 on: September 19, 2018, 04:20:41 pm »
OpenSSL is on my test (VM) machine installed, but it doesn't work (getting the "SSL/TLS support is not compiled" message).


How do I link statically?

BeniBela

  • Hero Member
  • *****
  • Posts: 905
    • homepage
Re: Linux, Synapse and SSL - How to distribute an application?
« Reply #3 on: September 19, 2018, 10:10:48 pm »
You can change the searched file names: https://sourceforge.net/p/synalist/feature-requests/19/

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Linux, Synapse and SSL - How to distribute an application?
« Reply #4 on: October 01, 2018, 03:59:59 pm »
Seems some distro's do not include libcrypto ... I guess for those users an apt-get is the only fix:


Code: Pascal  [Select][+][-]
  1. sudo apt-get install libssl-dev

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: [SOLVED] Linux, Synapse and SSL - How to distribute an application?
« Reply #5 on: October 01, 2018, 04:37:39 pm »

For those interested, this is a way to detect if the libs are there or not with Synapse (open to suggestions if this can be done better - I'm not a fan of comparing strings);


Code: Pascal  [Select][+][-]
  1. uses ... ssl_openssl, httpsend, blcksock, synautil ...;
  2. ...
  3. var
  4.   aHTTP: THTTPSend;
  5. begin
  6. ...
  7.   aHTTP:=THTTPSend.Create;
  8.   if aHTTP.Sock.SSL.LibName='ssl_none' then
  9.     begin
  10.       // no SSL available, loading libs failed
  11.     end;
  12. ...


Maybe it's useful to someone looking at the same problem ...

 

TinyPortal © 2005-2018