Created
September 19, 2021 20:42
-
-
Save juliofalbo/e06a303e9ed759b70223f47170fecf7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The value of ssl_verify_callback is assigned to Net::HTTP#verify_callback | |
response = RestClient::Resource.new( | |
'https://localhost?q=Foo', | |
:ssl_client_cert => OpenSSL::X509::Certificate.new(File.read(ssl_client_cert)), # Part of the Client Certificate Validation | |
:ssl_client_key => OpenSSL::PKey::RSA.new(File.read(ssl_client_key), key_pass), # Part of the Client Certificate Validation | |
:ssl_ca_file => ssl_ca_file, # Part of the Client Certificate Validation | |
:verify_ssl => OpenSSL::SSL::VERIFY_PEER, # Part of the Client Certificate Validation | |
:ssl_verify_callback => lambda(&method(:ssl_verify_callback)) # Part of the Client Certificate Validation | |
).get |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment