diff options
Diffstat (limited to 'community/crystal/tests-libressl.patch')
-rw-r--r-- | community/crystal/tests-libressl.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/community/crystal/tests-libressl.patch b/community/crystal/tests-libressl.patch new file mode 100644 index 0000000000..9513c122c5 --- /dev/null +++ b/community/crystal/tests-libressl.patch @@ -0,0 +1,29 @@ +Hacks needed to make tests pass on LibreSSL. + +--- a/spec/std/openssl/ssl/context_spec.cr ++++ b/spec/std/openssl/ssl/context_spec.cr +@@ -194,13 +194,13 @@ + expect_raises(ArgumentError, "missing private key") do + OpenSSL::SSL::Context::Client.from_hash({} of String => String) + end +- expect_raises(OpenSSL::Error, "SSL_CTX_use_PrivateKey_file: error:02001002:system library:fopen:No such file or directory") do ++ expect_raises(OpenSSL::Error, "SSL_CTX_use_PrivateKey_file: error:02FFF002:system library:func(4095):No such file or directory") do + OpenSSL::SSL::Context::Client.from_hash({"key" => "foo"}) + end + expect_raises(ArgumentError, "missing certificate") do + OpenSSL::SSL::Context::Client.from_hash({"key" => private_key}) + end +- expect_raises(OpenSSL::Error, "SSL_CTX_use_certificate_chain_file: error:02001002:system library:fopen:No such file or directory") do ++ expect_raises(OpenSSL::Error, "SSL_CTX_use_certificate_chain_file: error:02FFF002:system library:func(4095):No such file or directory") do + OpenSSL::SSL::Context::Client.from_hash({"key" => private_key, "cert" => "foo"}) + end + expect_raises(ArgumentError, "Invalid SSL context: missing CA certificate") do +@@ -212,7 +212,7 @@ + expect_raises(ArgumentError, "Invalid SSL context: missing CA certificate") do + OpenSSL::SSL::Context::Client.from_hash({"key" => private_key, "cert" => certificate, "verify_mode" => "peer"}) + end +- expect_raises(OpenSSL::Error, "SSL_CTX_load_verify_locations: error:02001002:system library:fopen:No such file or directory") do ++ expect_raises(OpenSSL::Error, "SSL_CTX_load_verify_locations: error:02FFF002:system library:func(4095):No such file or directory") do + OpenSSL::SSL::Context::Client.from_hash({"key" => private_key, "cert" => certificate, "ca" => "foo"}) + end + end |