Recent

Author Topic: Synapse and Catalina SSL causing crash  (Read 4148 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 10784
Re: Synapse and Catalina SSL causing crash
« Reply #15 on: February 19, 2020, 10:32:03 am »
While trying to put together a working example, my iMac mini's disk has just died. It is pushing up daisies, gone to meet its maker, it is an ex-mini.
Will try to get a new one (second hand, any offers?)
It was only seven years old.... :'( :'( It had already a long history of illness...

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1430
  • Former Delphi 1-7, 10.2 user
Re: Synapse and Catalina SSL causing crash
« Reply #16 on: February 19, 2020, 11:26:22 am »
While trying to put together a working example, my iMac mini's disk has just died. It is pushing up daisies, gone to meet its maker, it is an ex-mini.
Will try to get a new one (second hand, any offers?)
It was only seven years old.... :'( :'( It had already a long history of illness...

I've replaced disk drives in Mac minis from 2009, 2010, 2011 and 2012 - it's relatively easy, and even easier once you can dispense with the putty knife models. No need to buy another mini. Plenty of DIY videos online.

My 2009 Mac mini finally died after 11 years of 24x7 service earlier this year - spontaneous reboots several times a day. Not a bad innings though :)
Lazarus 2.1 r65061 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r65070 FPC 3.3.1 r49223 macOS 11.2.3 aarch64 Xcode 12.4
Lazarus 2.1 r61574 FPC 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM

VTwin

  • Hero Member
  • *****
  • Posts: 990
  • Former Turbo Pascal 3 user
Re: Synapse and Catalina SSL causing crash
« Reply #17 on: February 20, 2020, 06:36:55 pm »
This is what I use - it works on macos Mojave and Catalina, FreeBSD, Ubuntu Linux and Windows.

Many thanks. I have been using Synapse, which seemed to work fine, but was unaware of the Catalina issue, and the potential Windows issue. This gets rid of the Synapse dependence as well.

Your code is working fine for me on Linux, Mac, and Windows. I do not currently have Catalina installed.
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.0
macOS 10.13.6: Lazarus 2.0.12 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.12 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.12 (64 bit on VBox)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1430
  • Former Delphi 1-7, 10.2 user
Re: Synapse and Catalina SSL causing crash
« Reply #18 on: February 20, 2020, 11:24:16 pm »
Good to hear VTwin.
Lazarus 2.1 r65061 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r65070 FPC 3.3.1 r49223 macOS 11.2.3 aarch64 Xcode 12.4
Lazarus 2.1 r61574 FPC 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM

Arvur

  • New Member
  • *
  • Posts: 48
    • My GitHub
Re: Synapse and Catalina SSL causing crash
« Reply #19 on: January 09, 2021, 11:56:13 am »
For those who need Synapse to work with LibreSSL on Catalina and BigSur. Call this routine from initialization section of ssl_openssl_lib:
Quote
{$IFDEF DARWIN}
procedure CheckOpenSSLFixNeeded;
const
  fixDarwinRelease = 19; // Catalina
var
  KernelInfo: UtsName;
begin
  if (fpUName(KernelInfo) = 0) then
    if (StrToIntDef(Copy(KernelInfo.Release, 1, 2), 0) >= fixDarwinRelease) then begin
      DLLSSLName  := '/usr/lib/libssl.46.dylib';
      DLLUtilName := '/usr/lib/libcrypto.44.dylib';
    end; 
end;
{$ENDIF DARWIN}
Use IFDEF to call this on Darwin only.

P.S. Catalina blocked using libssl.dylib and libcrypto.dylib wrappers and BigSur stopped us from listing dylib's in /usr/lib/ to find last version. So we just stick on existing LibreSSL version.
« Last Edit: January 14, 2021, 12:33:48 pm by Arvur »

herux

  • Full Member
  • ***
  • Posts: 102
Re: Synapse and Catalina SSL causing crash
« Reply #20 on: March 13, 2021, 12:09:34 pm »
thank @Arvur it work on bigSur

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 321
Re: Synapse and Catalina SSL causing crash
« Reply #21 on: March 13, 2021, 12:35:49 pm »
I'm afraid to use Synaps/libssl anymore. It may become broken with any future macOS version again.

Moved my code to Cocoa network classes.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1430
  • Former Delphi 1-7, 10.2 user
Re: Synapse and Catalina SSL causing crash
« Reply #22 on: March 13, 2021, 11:36:58 pm »
Using the macOS third party SSL libraries is no longer, if it ever was, a good idea - please see the Wiki article OpenSSL, LibreSSL, Secure Transport, Network Framework for why.
Lazarus 2.1 r65061 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.1 r65070 FPC 3.3.1 r49223 macOS 11.2.3 aarch64 Xcode 12.4
Lazarus 2.1 r61574 FPC 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM

 

TinyPortal © 2005-2018