Method: HTTPClient::SSLConfig#set_crl

Defined in:
lib/httpclient/ssl_config.rb

#set_crl(crl) ⇒ Object

Adds CRL for verification.

crl

a OpenSSL::X509::CRL or a filename of a PEM/DER formatted OpenSSL::X509::CRL.

Calling this method resets all existing sessions.



159
160
161
162
163
164
165
166
# File 'lib/httpclient/ssl_config.rb', line 159

def set_crl(crl)
  unless crl.is_a?(X509::CRL)
    crl = X509::CRL.new(File.open(crl).read)
  end
  @cert_store.add_crl(crl)
  @cert_store.flags = X509::V_FLAG_CRL_CHECK | X509::V_FLAG_CRL_CHECK_ALL
  change_notify
end