Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve check for openssl on macOS #1104

Merged
merged 1 commit into from
Jul 25, 2017
Merged

Improve check for openssl on macOS #1104

merged 1 commit into from
Jul 25, 2017

Conversation

mislav
Copy link
Member

@mislav mislav commented Jun 12, 2017

  • Only call openssl version once;

  • Make the check work with future version of LibreSSL after 2.2.7. This assumes that Apple might keep updating LibreSSL shipping with macOS, but that they will never provide header files.

Followup to #1095

/cc @hsbt @osyoyu

- Only call `openssl version` once;

- Make the check work with future version of LibreSSL after 2.2.7. This
  assumes that Apple might keep updating LibreSSL shipping with macOS,
  but that they will never provide header files.
Copy link
Member

@jeremy jeremy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering OpenSSL has been deprecated on macOS for years and is now missing headers entirely, what do you think about always treating macOS OpenSSL as missing?

needs_mac_openssl() {
  is_mac &&
  [[ "$RUBY_CONFIGURE_OPTS" != *--with-openssl-dir=* ]] &&
  ! use_homebrew_openssl
}

@mislav
Copy link
Member Author

mislav commented Jun 12, 2017

@jeremy That's a good point. If there wasn't ever a /usr/bin/openssl that passed this check (since it was "0.9.8" since forever), nor will it ever (now that we blacklisted LibreSSL), I guess we can drop the openssl version check entirely?

@hsbt
Copy link
Member

hsbt commented Jun 13, 2017

my understanding is following summary about OpenSSL on macOS.

  • < 10.11(El Capitan) : macOS has openssl-0.9.8, but it's forked binary for Apple, so It's broken.
  • >= 10.11(El Capitan), < 10.13(High Sierra) : macOS was not provide OpenSSL header.
  • = 10.13(High Sierra) : macOS changed LibreSSL from OpenSSL, but it was not provided header files same as El Capitan.(I did not confirm it yet)

So, OpenSSL/LibreSSL of macOS is completely broken. I agreed to use jeremy's condition for openssl veriication.

@hsbt hsbt merged commit db3e43a into master Jul 25, 2017
@hsbt hsbt deleted the openssl-check branch July 25, 2017 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants