From 4d5664d0f96db9ca401368ea25b3669450c20a7a Mon Sep 17 00:00:00 2001 From: Andreas Karlsson Date: Wed, 11 Feb 2026 04:04:39 +0100 Subject: [PATCH 1/2] Remove support for reading CAS files from disk in spec helpers We never use this feature so it is just dead code and if we would ever want to do it it would be trivial to code. --- spec/helpers.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/spec/helpers.rb b/spec/helpers.rb index 5935e2034..10095d60b 100644 --- a/spec/helpers.rb +++ b/spec/helpers.rb @@ -355,7 +355,6 @@ def next_serial end def create_ca_cert(name, ca_key, x509_name, valid_years: 10) - ca_key = OpenSSL::PKey::RSA.new File.read "#{ca_key}" unless ca_key.kind_of?(OpenSSL::PKey::RSA) ca_name = OpenSSL::X509::Name.parse x509_name ca_cert = OpenSSL::X509::Certificate.new @@ -396,7 +395,6 @@ def create_key(name, rsa_size: 2048) end def create_signing_request(name, x509_name, key) - key = OpenSSL::PKey::RSA.new File.read "#{key}" unless key.kind_of?(OpenSSL::PKey::RSA) csr = OpenSSL::X509::Request.new csr.version = 0 csr.subject = OpenSSL::X509::Name.parse x509_name @@ -411,9 +409,6 @@ def create_signing_request(name, x509_name, key) end def create_cert_from_csr(name, csr, ca_cert, ca_key, valid_years: 10, dns_names: nil) - ca_key = OpenSSL::PKey::RSA.new File.read "#{ca_key}" unless ca_key.kind_of?(OpenSSL::PKey::RSA) - ca_cert = OpenSSL::X509::Certificate.new File.read "#{ca_cert}" unless ca_cert.kind_of?(OpenSSL::X509::Certificate) - csr = OpenSSL::X509::Request.new File.read "#{csr}" unless csr.kind_of?(OpenSSL::X509::Request) raise 'CSR can not be verified' unless csr.verify csr.public_key csr_cert = OpenSSL::X509::Certificate.new From 90726ba41ebe78fee8f534ebfb54b58abe9a1696 Mon Sep 17 00:00:00 2001 From: Andreas Karlsson Date: Wed, 11 Feb 2026 04:06:13 +0100 Subject: [PATCH 2/2] Do not echo queries from createdb This command line argument was most likely leftover debug code. --- spec/helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/helpers.rb b/spec/helpers.rb index 10095d60b..0a1352edc 100644 --- a/spec/helpers.rb +++ b/spec/helpers.rb @@ -227,7 +227,7 @@ def initialize(name, port: 23456, postgresql_conf: '') def create_test_db trace "Creating the test DB" log_and_run @logfile, pg_bin_path('psql'), '-p', @port.to_s, '-e', '-c', 'DROP DATABASE IF EXISTS test', 'postgres' - log_and_run @logfile, pg_bin_path('createdb'), '-p', @port.to_s, '-e', 'test' + log_and_run @logfile, pg_bin_path('createdb'), '-p', @port.to_s, 'test' end def connect