-
Notifications
You must be signed in to change notification settings - Fork 798
Use OpenSSL 3.5.x LTS version with next stable version #2599
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,10 +1,26 @@ | ||||||||||||||||||||||
| #!/usr/bin/env ruby | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| raise "Usage: #{$0} NEW_VERSION SHA" unless ARGV.size == 2 | ||||||||||||||||||||||
| new_version, sha = ARGV | ||||||||||||||||||||||
| require 'open-uri' | ||||||||||||||||||||||
| require 'digest/sha2' | ||||||||||||||||||||||
| require 'tempfile' | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| raise "Usage: #{$0} NEW_VERSION" unless ARGV.size == 1 | ||||||||||||||||||||||
| new_version = ARGV[0] | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| major_minor = new_version.split('.')[0..1].join('.') | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| url = "https://github.com/openssl/openssl/releases/download/openssl-#{new_version}/openssl-#{new_version}.tar.gz" | ||||||||||||||||||||||
| sha = nil | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Tempfile.create(['openssl', '.tar.gz']) do |tmpfile| | ||||||||||||||||||||||
| URI.open(url) do |remote_file| | ||||||||||||||||||||||
| IO.copy_stream(remote_file, tmpfile) | ||||||||||||||||||||||
|
Comment on lines
+16
to
+17
|
||||||||||||||||||||||
| URI.open(url) do |remote_file| | |
| IO.copy_stream(remote_file, tmpfile) | |
| begin | |
| URI.open(url) do |remote_file| | |
| IO.copy_stream(remote_file, tmpfile) | |
| end | |
| rescue OpenURI::HTTPError => e | |
| abort "Failed to download #{url}: #{e.message}" | |
| rescue SocketError, IOError, SystemCallError => e | |
| abort "Network error while downloading #{url}: #{e.class}: #{e.message}" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| install_package "openssl-3.0.18" "https://github.com/openssl/openssl/releases/download/openssl-3.0.18/openssl-3.0.18.tar.gz#d80c34f5cf902dccf1f1b5df5ebb86d0392e37049e5d73df1b3abae72e4ffe8b" openssl --if needs_openssl:1.0.2-3.x.x | ||
| install_package "openssl-3.5.4" "https://github.com/openssl/openssl/releases/download/openssl-3.5.4/openssl-3.5.4.tar.gz#967311f84955316969bdb1d8d4b983718ef42338639c621ec4c34fddef355e99" openssl --if needs_openssl:1.0.2-3.x.x | ||
| install_git "ruby-master" "https://github.com/ruby/ruby.git" "master" autoconf enable_shared standard_install_with_bundled_gems |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| install_package "openssl-3.0.18" "https://github.com/openssl/openssl/releases/download/openssl-3.0.18/openssl-3.0.18.tar.gz#d80c34f5cf902dccf1f1b5df5ebb86d0392e37049e5d73df1b3abae72e4ffe8b" openssl --if needs_openssl:1.0.2-3.x.x | ||
| install_package "openssl-3.5.4" "https://github.com/openssl/openssl/releases/download/openssl-3.5.4/openssl-3.5.4.tar.gz#967311f84955316969bdb1d8d4b983718ef42338639c621ec4c34fddef355e99" openssl --if needs_openssl:1.0.2-3.x.x | ||
| install_git "ruby-master" "https://github.com/ruby/ruby.git" "master" autoconf enable_shared standard_install_with_bundled_gems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The open-uri library enables Kernel.open to automatically open URIs, which can be a security concern. While the URL is constructed from a version parameter and targets a specific GitHub pattern, consider using URI.open explicitly (which you are doing) and potentially adding validation that the version parameter only contains expected characters (digits and dots) to prevent any potential URL manipulation.