Skip to content

Commit

Permalink
Fix macro check to responds_to?
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Nov 11, 2024
1 parent 4e3f9cf commit 32e41c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec/std/openssl/ssl/context_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 32e41c2

Please sign in to comment.