jborean93/omi

Set OpenSSL link path for macOS at install time

jborean93 opened this issue · 0 comments

SUMMARY

Right now the macOS library is hardcoded to link to /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib and /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib for the OpenSSL libs. This path is the one used by the x86_64 brew installer when installing the openssl package. Usually this is fine for most people but there are some new cases popping up when this might not be desirable like

  • People using MacPorts to install OpenSSL, uses a different location
  • People compiling their own OpenSSL version to a custom location
  • When PowerShell eventually creates an arm64 port then the arm64 OpenSSL libs from brew are in a different location

What I'm hoping to implement is for Install-WSMan to check the various known locations of the OpenSSL libraries and select the one relevant to the architecture that PowerShell is running on. It will then use install_name_tool to rewrite the linked path to the libraries selected when it is installed making it work by default in more locations.

We could even add a check/warning to indicate when the wrong OpenSSL architecture was installed or no OpenSSL libs were found making it easier for end users to figure out why WSMan isn't working rather than the cryptic failed to load WSMan libraries error from PowerShell.

Related #20

LIBMI VERSION

N/A

OS / ENVIRONMENT

macOS