FAQ
Hi Islan,

Sorry for the silence - got sucked into something unplanned.

Ok, let me try your suggestion and revert back

Thanks and rgds,
Vatsan

Google+ <https://google.com/+SrivathsanMadhavan>
Maverick Software Engineer
<https://plus.google.com/b/102005838874122947401/102005838874122947401/posts>

On Mon, Jun 23, 2014 at 10:11 PM, Islan Dberry wrote:

This is a problem creating the TLS connection. The problem is not specific
to websockets.

Specify a
http://godoc.org/code.google.com/p/go.net/websocket#Config.TlsConfig with
http://godoc.org/crypto/tls#Config.RootCAs set to your server's root or
with http://godoc.org/crypto/tls#Config.InsecureSkipVerify set to true.

On Monday, June 23, 2014 6:03:06 AM UTC-7, Srivathsan Madhavan wrote:

Hi,

I have a Websocket client app that uses "*code.google.com/p/go.net/websocket
<http://code.google.com/p/go.net/websocket>*" package and I have a
Websocket server app but it uses the "*github.com/gorilla/websocket
<http://github.com/gorilla/websocket>*" package. The 2 apps are very
much talking to each other with plain (unsecured) Websocket comm.

In my quest to learn about Secure comm., I created a 3072-bit RSA private
key with the following command:

*openssl genrsa 3072 > privkey.txt*

Then I created self-signed certificate with the following command:

*openssl req -new -x509 -key privkey.txt -out selfcert.pem -days 1096*

In my Websocket server app, I used *http.ListenAndServeTLS()* instead of
*http.ListenAndServe()* and in my client app, I just changed "*ws://...*"
to "*wss://...*" while calling *websocket.Dial()*. The Server-app runs
fine and keeps listening to incoming requests.

But when I run the (secured) client app, I am getting the following error:

*ERROR: connecting to %!s(*string=0xc084002760) - websocket.Dial
wss://localhost:7573: x509: certificate signed by unknown authority*

Please note that I am a newbie to TLS et al. Hence I would like to know
where I am going wrong or should I do something more.

Thanks in advance.

rgds,
Vatsan

--
You received this message because you are subscribed to a topic in the
Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/golang-nuts/Xfq58xDjZow/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJul 3, '14 at 4:20a
activeJul 3, '14 at 4:20a
posts1
users1
websitegolang.org

1 user in discussion

Vatsan: 1 post

People

Translate

site design / logo © 2022 Grokbase