Skip to content

Commit

Permalink
Add FreeBSD-specific SONAME versions to portable OpenSSL probing.
Browse files Browse the repository at this point in the history
The version of OpenSSL installed will depend on the version of FreeBSD and
whether OpenSSL has been updated from the FreeBSD Ports collection.

The order of attempted loading is:
    libssl.so.11 (ports)
    libssl.so.111 (base FreeBSD using OpenSSL 1.1.1)
    libssl.so.8 (base FreeBSD using OpenSSL 1.0.2)
  • Loading branch information
jasonpugsley authored Apr 15, 2020
1 parent d8d7471 commit da6e4bb
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,23 @@ static bool OpenLibrary()
DlOpen(MAKELIB("10"));
}

// FreeBSD uses a different suffix numbering convention.
// Current supported FreeBSD releases should use the order .11 -> .111 -> .8
if (libssl == NULL)
{
DlOpen(MAKELIB("11"));
}

if (libssl == NULL)
{
DlOpen(MAKELIB("111"));
}

if (libssl == NULL)
{
DlOpen(MAKELIB("8"));
}

return libssl != NULL;
}

Expand Down

0 comments on commit da6e4bb

Please sign in to comment.