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

Raise minimum supported Apple OS versions #388

Merged
merged 1 commit into from
Jan 7, 2024

Conversation

BlackHoleFox
Copy link
Contributor

This is the second part of #371, and follows the new policy to significantly improve the two Apple OS backends of getrandom now that Rust has officially removed support for versions of macOS before 10.12, among others.

The actual code changes are really a mirror of my work in std here from a few months back. The two main things are:

  • getentropy is now unconditionally linked on macOS since its assumed 10.12 is always the minimum deployment target. So macOS no longer needs the urandom file reading logic.
  • iOS and derivatives changed to use CCRandomGenerateBytes, which is part of CommonCrypto inside libSystem.framework. This is the same function the previous SecRandomCopyBytes call wrapped around anyway, so other then dropping the Security.framework dependency its identical. Its also what BoringSSL uses if its need better selling.

@newpavlov
Copy link
Member

Looks good! Please also add an appropriate CHANGELOG entry.

@BlackHoleFox
Copy link
Contributor Author

Added this entry to the CHANGELOG:

  • Raise minimum supported Apple OS versions to macOS 10.12 and iOS 10.

@newpavlov newpavlov merged commit 5fe3c8e into rust-random:master Jan 7, 2024
49 checks passed
@newpavlov newpavlov mentioned this pull request Jan 7, 2024
sammoore added a commit to paradigmpost/getrandom-legacy-macos that referenced this pull request Jan 11, 2024
@BlackHoleFox BlackHoleFox deleted the legacy-apple-cleanup branch August 6, 2024 06:51
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.

2 participants