summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorSimon Chopin <simon.chopin@canonical.com>2022-04-06 18:43:57 +0200
committerFlorian Wininger <fw.centrale@gmail.com>2022-04-29 14:42:49 +0200
commite4ffdc07b1f0f01ebeab359c1001984912d87437 (patch)
tree016ec4988ac6936efe5bd109838ed8d3a99acb44 /Rakefile
parentb07e284bd64750150d38bd207e9b7b37a1f15e83 (diff)
downloadnet-ssh-e4ffdc07b1f0f01ebeab359c1001984912d87437.tar.gz
tests: Enable legacy providers if using OpenSSL 3.0
Quite a few tests rely on outdated algorithms that have been relegated to the legacy provider in OpenSSL 3.0. `rake test` now loads a custom OpenSSL configuration file to enable said legacy provider, which is usually disabled by default.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 92d7a9f..5f5925d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -95,6 +95,12 @@ Rake::TestTask.new do |t|
t.test_files = test_files
end
+# We need to enable the OpenSSL 3.0 legacy providers for our test suite
+require 'openssl'
+if OpenSSL::OPENSSL_LIBRARY_VERSION.start_with? "OpenSSL 3" then
+ ENV['OPENSSL_CONF'] = 'test/openssl3.conf'
+end
+
desc "Run tests of Net::SSH:Test"
Rake::TestTask.new do |t|
t.name = "test_test"