adamdruppe / arsd

This is a collection of modules that I've released over the years. Most of them stand alone, or have just one or two dependencies in here, so you don't have to download this whole repo.
http://arsd-official.dpldocs.info/arsd.html
530 stars 125 forks source link

Use arrays for potential OpenSSL lib filenames #324

Closed zorael closed 2 years ago

zorael commented 2 years ago

This should fix SSL loading on macOS while allowing for easy additions on so-name bumps on any platform.

Big disclaimer: I don't know enough to know if it's correct, I just know it seems to work. Tested on Manjaro/Arch, Windows 11 and macOS Catalina, all x86_64.

Just close if you'd prefer to write (or have already written) a solution yourself.

adamdruppe commented 2 years ago

I'll take a closer look in a bit and prolly merge then fix up just my internet is kinda crappy right now.

zorael commented 2 years ago

Cheers, thanks

adamdruppe commented 2 years ago

On Wed, Apr 20, 2022 at 10:04:04AM -0700, JR wrote:

          oeaylib_handle = LoadLibraryW("libcrypto-1_1-x64.dll"w.ptr);

libssl32.dll is on :3287, if that's the one you mean?

no, the one with -x64 at the end

zorael commented 2 years ago

I'm not seeing it but doh, just shows why it got lost. Yeah, please fixup if so.

I left the Windows X86_64 branch untouched since there was only one option (the -x64.dlls). It's hard to tell from the diff though.

        } else version(Windows) {
            version(X86_64) {
                ossllib_handle = LoadLibraryW("libssl-1_1-x64.dll"w.ptr);
                oeaylib_handle = LoadLibraryW("libcrypto-1_1-x64.dll"w.ptr);
            } else {

My second pull request ever, yay.

adamdruppe commented 2 years ago

there we go, most of it whitespace since i unindented it again but this looks good now https://github.com/adamdruppe/arsd/commit/582f4287f8d4b22570f1716b4ce293dc85a56c37

thanks for all this!