From 32e41c2a682accd0383eaa0e875b954eea2e0453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Mon, 11 Nov 2024 15:09:45 +0100 Subject: [PATCH] Fix macro check to `responds_to?` --- spec/std/openssl/ssl/context_spec.cr | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spec/std/openssl/ssl/context_spec.cr b/spec/std/openssl/ssl/context_spec.cr index 2d8bda006690..cf14e8e5f39a 100644 --- a/spec/std/openssl/ssl/context_spec.cr +++ b/spec/std/openssl/ssl/context_spec.cr @@ -128,11 +128,12 @@ describe OpenSSL::SSL::Context do context = OpenSSL::SSL::Context::Client.new level = context.security_level context.security_level = level + 1 - {% if LibSSL.has_method?(:ssl_ctx_get_security_level) %} + + if LibSSL.responds_to?(:ssl_ctx_set_security_level) context.security_level.should eq(level + 1) - {% else %} + else context.security_level.should eq 0 - {% end %} + end end it "adds temporary ecdh curve (P-256)" do