Skip to content

Commit

Permalink
make DEFAULT_CERT_STORE frozen and shareable
Browse files Browse the repository at this point in the history
  • Loading branch information
HoneyryderChuck committed Nov 7, 2024
1 parent d89f28c commit b1c44db
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/openssl/ssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ class SSLContext
)
end

DEFAULT_CERT_STORE = OpenSSL::X509::Store.new # :nodoc:
DEFAULT_CERT_STORE.set_default_paths
DEFAULT_CERT_STORE.flags = OpenSSL::X509::V_FLAG_CRL_CHECK_ALL
DEFAULT_CERT_STORE = OpenSSL::X509::Store.new.tap do |store| # :nodoc:
store.set_default_paths
store.flags = OpenSSL::X509::V_FLAG_CRL_CHECK_ALL
store.freeze
end

# A callback invoked when DH parameters are required for ephemeral DH key
# exchange.
Expand Down

0 comments on commit b1c44db

Please sign in to comment.