ayaports/user/gitlab-foss/117063_openssl3-compat.patch

91 lines
4.7 KiB
Diff

diff --git a/Gemfile b/Gemfile
index 1110e324e1113488bf76d7ab94352b999c478cc9..a819b603296ec9f11c4bff00cb9e00e41ea7ceae 100644
--- a/Gemfile
+++ b/Gemfile
@@ -17,9 +17,7 @@ gem 'rails', '~> 6.1.7.2'
gem 'bootsnap', '~> 1.16.0', require: false
-# Pin openssl to match the version bundled with our supported Rubies.
-# See https://stdgems.org/openssl/#gem-version.
-gem 'openssl', '2.2.2'
+gem 'openssl', '~> 3.0'
# This gem was originally bundled with Ruby 2.7, but is unbundled as of Ruby 3.
# Since the latest version caused problems with GitLab, we pin this to an older
# version for now.
diff --git a/Gemfile.checksum b/Gemfile.checksum
index f5228227f1b0723c3cbf9dbf618b4c825c430038..fe206bde66995c30682eec938def27a1698e7417 100644
--- a/Gemfile.checksum
+++ b/Gemfile.checksum
@@ -421,7 +421,7 @@
{"name":"omniauth_openid_connect","version":"0.6.1","platform":"ruby","checksum":"5f1318f5b19b05e339ff494def060b57a503b1e3ea83c3a0ced6cc014407d423"},
{"name":"open4","version":"1.3.4","platform":"ruby","checksum":"a1df037310624ecc1ea1d81264b11c83e96d0c3c1c6043108d37d396dcd0f4b1"},
{"name":"openid_connect","version":"1.3.0","platform":"ruby","checksum":"a796855096850cc01140e37ea6ae9fd14f2be818b9b5bc698418063dfe228770"},
-{"name":"openssl","version":"2.2.2","platform":"ruby","checksum":"53f72382bac046c36c37049c7ec9d5597d42628d140b5cfbcd61e0226c0ca077"},
+{"name":"openssl","version":"3.1.0","platform":"ruby","checksum":"e3a01279e918a7a5cf741db69b124864878b1a9783b1f2d34854bc1d444ac430"},
{"name":"openssl-signature_algorithm","version":"1.3.0","platform":"ruby","checksum":"a3b40b5e8276162d4a6e50c7c97cdaf1446f9b2c3946a6fa2c14628e0c957e80"},
{"name":"opentracing","version":"0.5.0","platform":"ruby","checksum":"deb5d7abe6b0e7631d866d8cb5ee7bb9352650a504a32f61591302bc510b9286"},
{"name":"optimist","version":"3.0.1","platform":"ruby","checksum":"336b753676d6117cad9301fac7e91dab4228f747d4e7179891ad3a163c64e2ed"},
diff --git a/Gemfile.lock b/Gemfile.lock
index 8783a40b99acb9f695c91a86f7357b3351909a18..ac9e5f9b69e9e5d815794cce46133029bc99cb52 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1091,8 +1091,7 @@ GEM
validate_email
validate_url
webfinger (>= 1.0.1)
- openssl (2.2.2)
- ipaddr
+ openssl (3.1.0)
openssl-signature_algorithm (1.3.0)
openssl (> 2.0)
opentracing (0.5.0)
@@ -1847,7 +1846,7 @@ DEPENDENCIES
omniauth_crowd (~> 2.4.0)!
omniauth_openid_connect (~> 0.6.1)
openid_connect (= 1.3.0)
- openssl (= 2.2.2)
+ openssl (~> 3.0)
org-ruby (~> 0.9.12)
pact (~> 1.63)
parallel (~> 1.19)
diff --git a/spec/lib/gitlab/ci/secure_files/cer_spec.rb b/spec/lib/gitlab/ci/secure_files/cer_spec.rb
index 6b9cd0e3bfc6223fc3eaed9d5027b06e4c89a0b4..1393e8d2efd3ee1b399ab4da3280b6808b04659f 100644
--- a/spec/lib/gitlab/ci/secure_files/cer_spec.rb
+++ b/spec/lib/gitlab/ci/secure_files/cer_spec.rb
@@ -9,7 +9,7 @@
describe '#certificate_data' do
it 'assigns the error message and returns nil' do
expect(invalid_certificate.certificate_data).to be nil
- expect(invalid_certificate.error).to eq('not enough data')
+ expect(invalid_certificate.error).to eq('PEM_read_bio_X509: no start line')
end
end
diff --git a/spec/lib/gitlab/ci/secure_files/mobile_provision_spec.rb b/spec/lib/gitlab/ci/secure_files/mobile_provision_spec.rb
index fb382174c649531c673df2ab7091d0316bbd44a5..1812b90df8b436c89f0dea5841d98c364313e5d9 100644
--- a/spec/lib/gitlab/ci/secure_files/mobile_provision_spec.rb
+++ b/spec/lib/gitlab/ci/secure_files/mobile_provision_spec.rb
@@ -10,7 +10,7 @@
describe '#decoded_plist' do
it 'assigns the error message and returns nil' do
expect(invalid_profile.decoded_plist).to be nil
- expect(invalid_profile.error).to eq('Could not parse the PKCS7: not enough data')
+ expect(invalid_profile.error).to eq('Could not parse the PKCS7: no start line')
end
end
diff --git a/spec/models/ci/secure_file_spec.rb b/spec/models/ci/secure_file_spec.rb
index e526e90e25009e3c0ee6facdb4fea63f2374d69a..478af41266db213e9ec8d7b3bb97ca54aaf5f596 100644
--- a/spec/models/ci/secure_file_spec.rb
+++ b/spec/models/ci/secure_file_spec.rb
@@ -194,7 +194,7 @@
it 'logs an error when something goes wrong with the file parsing' do
corrupt_file = create(:ci_secure_file, name: 'file1.cer', file: CarrierWaveStringFile.new('11111111'))
- message = 'Validation failed: Metadata must be a valid json schema - not enough data.'
+ message = 'Validation failed: Metadata must be a valid json schema - PEM_read_bio_X509: no start line.'
expect(Gitlab::AppLogger).to receive(:error).with("Secure File Parser Failure (#{corrupt_file.id}): #{message}")
corrupt_file.update_metadata!
end