Sha256: 3aa80a62d3d270fc3c2bf2c097f5add1c3f9b691e5d5c128a5c689475c58a8d6
Contents?: true
Size: 1.41 KB
Versions: 1
Compression:
Stored size: 1.41 KB
Contents
Given /^a Stomp (\d+\.\d+)?\s*SSL broker$/ do |version| @broker = TestSSLStompServer.new(version) @broker.start end When /^a connection is created for the SSL broker$/ do @connection = Stomper::Connection.new("stomp+ssl:///") end When /^the broker's host is "([^"]*)"$/ do |hostname| @connection.host = hostname end When /^no SSL verification is performed$/ do @connection.ssl[:verify_mode] = OpenSSL::SSL::VERIFY_NONE end When /^SSL verification is performed$/ do @connection.ssl[:verify_mode] = ::OpenSSL::SSL::VERIFY_PEER | ::OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT end When /^an SSL post connection check is performed on "([^"]*)"$/ do |host| @connection.ssl[:post_connection_check] = host end Then /^connecting should raise an openssl error$/ do lambda { @connection.connect }.should raise_error(OpenSSL::SSL::SSLError) end When /^an SSL post connection check is not performed$/ do @connection.ssl[:post_connection_check] = false end When /^the broker's certificate is verified by CA$/ do @connection.ssl[:ca_file] = File.expand_path('../../support/ssl/demoCA/cacert.pem', __FILE__) end When /^the client's certificate and key are specified$/ do @connection.ssl[:cert] = OpenSSL::X509::Certificate.new(File.read(File.expand_path('../../support/ssl/client_cert.pem', __FILE__))) @connection.ssl[:key] = OpenSSL::PKey::RSA.new(File.read(File.expand_path('../../support/ssl/client_key.pem', __FILE__))) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
stomper-2.0.0 | features/steps/secure_connections_steps.rb |