Created
June 28, 2013 14:45
-
-
Save claudijd/5885221 to your computer and use it in GitHub Desktop.
httpclient SSLConfig initlialization
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
# Creates a SSLConfig. | |
def initialize(client) | |
return unless SSLEnabled | |
@client = client | |
@cert_store = X509::Store.new | |
@client_cert = @client_key = @client_ca = nil | |
@verify_mode = SSL::VERIFY_PEER | SSL::VERIFY_FAIL_IF_NO_PEER_CERT | |
@verify_depth = nil | |
@verify_callback = nil | |
@dest = nil | |
@timeout = nil | |
@ssl_version = "SSLv3" | |
@options = defined?(SSL::OP_ALL) ? SSL::OP_ALL | SSL::OP_NO_SSLv2 : nil | |
# OpenSSL 0.9.8 default: "ALL:!ADH:!LOW:!EXP:!MD5:+SSLv2:@STRENGTH" | |
@ciphers = "ALL:!aNULL:!eNULL:!SSLv2" # OpenSSL >1.0.0 default | |
@cacerts_loaded = false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment