forked from zmalltalker/stomp
-
Notifications
You must be signed in to change notification settings - Fork 80
Ssl 120c
gmallard edited this page Mar 4, 2012
·
5 revisions
The ability to use SSL connections was added to the gem in version 1.1.3, and has essentially remained unchanged since that time.
SSL connections may be requested by either:
- Stomp::Client users
- Stomp::Connection users
A request for an SSL connection is indicated by either:
- Using hashed style parameters, with a hash parameter of :ssl => true
- Using a URL style parameter requesting SSL: stomp+ssl://sslhost:port
hash = { :hosts => [
{:login => 'guest', :passcode => 'guest', :host => 'tjjackson', :port => 62614, :ssl => true},
]
}
c = Stomp::Connection.new(hash)
url = "failover://(stomp+ssl://login1:passcode1@localhost:61616,stomp+ssl://login2:passcode2@remotehost:61617)"
c = Stomp::Client.new(url)
When this style of SSL connection is requested, the following occurs:
- An OpenSSL context object is created.
- The SSL verify mode in the context is set to VERIFY_NONE.
- An SSLSocket is created using the context. The SSL handshake occurs during this process.
This behavior will not change as a result of the enhancements being added.
Note that this methodology implements Use Case 1, as described in: SSL Use Cases.