stomp icon indicating copy to clipboard operation
stomp copied to clipboard

Add SSL support

Open dorseydick opened this issue 10 years ago • 8 comments

It would be great if this would support SSL connections. Right now we're using stomp+ssl on port 61613 so we can't use straight tcp connections.

dorseydick avatar May 19 '14 20:05 dorseydick

If you want to connect to a server using SSL, you can initiate the connection yourself, and then setup the STOMP connection using the following function:

  func Connect(conn io.ReadWriteCloser, opts Options) (*Conn, error)

Or are you using the simple STOMP server implementation and want it to support SSL?

jjeffery avatar May 19 '14 23:05 jjeffery

Sorry, I'm still new to go and have been trying to figure out how to do this. Just a connection to a server, namely ActiveMQ.

On Mon, May 19, 2014 at 7:05 PM, John Jeffery [email protected]:

If you want to connect to a server using SSL, you can initiate the connection yourself, and then setup the STOMP connection using the following function:

func Connect(conn io.ReadWriteCloser, opts Options) (*Conn, error)

Or are you using the simple STOMP server implementation and want it to support SSL?

— Reply to this email directly or view it on GitHubhttps://github.com/jjeffery/stomp/issues/10#issuecomment-43569212 .

dorseydick avatar May 20 '14 18:05 dorseydick

To create an SSL connection, use the crypto/tls package. See http://golang.org/pkg/crypto/tls/#Dial for details of the function to use to create a connection. The tls.Conn that this function returns can then be passed to the stomp.Connect function, because it implements the io.ReadWriteCloser interface.

jjeffery avatar May 20 '14 23:05 jjeffery

This issue is still open, were you planning on adding a convenience method or something?

flowchartsman avatar Apr 23 '15 16:04 flowchartsman

@alaska: Pull requests are very welcome.

jjeffery avatar Apr 24 '15 05:04 jjeffery

Is this the place to do it, or is go-stomp where all the happenings are?

flowchartsman avatar Apr 24 '15 05:04 flowchartsman

To be honest, I'm not all that sure. I moved the code to the go-stomp project after the announcement of gopkg, but since that time I'm not sure that it has been picked up by all that many projects. There are some members of the go team who are quite against the concept.

I wish I had not created the go-stomp repository, but now that it's there I'm sure it would cause problems if I removed it. Which repository have you been using?

On Fri, 24 Apr 2015 at 15:07 Andy Walker [email protected] wrote:

Is this the place to do it, or is go-stomp where all the happenings are?

— Reply to this email directly or view it on GitHub https://github.com/jjeffery/stomp/issues/10#issuecomment-95803354.

jjeffery avatar May 04 '15 22:05 jjeffery

go-stomp, if only because it looked more authoritative, what with its official-sounding name and all. I'm perfectly fine checking in here, however. I, too, am very reluctant to use gopkg.in, and kind of prefer in-repository versioning.

flowchartsman avatar May 05 '15 14:05 flowchartsman