[go-nuts] Re: How do you make a ReadCloser?

2022-06-30 Thread 'Ansuraj Khadanga' via golang-nuts
Thats great! Thanks for sharing. req.Body = ioutil.NopCloser(bytes.NewReader([]byte("foo"))) works! On Wednesday, 27 June 2018 at 22:21:52 UTC+5:30 keens...@gmail.com wrote: > This worked perfectly, thanks! > > > On Tuesday, December 1, 2015 at 5:29:27 AM UTC-8, Borja Berastegui wrote: >> >> re

Re: [go-nuts] ListenAndServeTLS() (pem and key files for private network)

2022-06-30 Thread 'Sean Liao' via golang-nuts
> using a self-signed certificate > without the browser complaining that the certificate is invalid By default, browsers trust certificates signed by Certificate Authorities (CA) in the system cert store. CAs can get added if they pass certain requirements. Typically they will only sign certifica

Re: [go-nuts] ListenAndServeTLS() (pem and key files for private network)

2022-06-30 Thread Hugh Myrie
Martin, all the information is helpful as I am provided with possible options. I am new to the SSL/TLS encryption process, so my question may not be clearly stated. Yes it is a private network but I want a secure network.and without the browser complaining that the certificate is invalid, The optio

Re: [go-nuts] ListenAndServeTLS() (pem and key files for private network)

2022-06-30 Thread Robert Engels
One great aspect of the certificates is that they can be revoked - so simply revoking a certificate will disable access across the board. Certificates are also supported by HSM and the like. It can simplify and secure the systems according to accepted security standards a bit more straightforwar

Re: [go-nuts] ListenAndServeTLS() (pem and key files for private network)

2022-06-30 Thread Martin Schnabel
Sorry, i may have misunderstood the private network part, hope my answer was helpful anyway. My usecase was a local area network without a fixed ip or dns names, like common home network appliances. I thought about using client certificates too, but decided it would be easier to use common sess

Re: [go-nuts] ListenAndServeTLS() (pem and key files for private network)

2022-06-30 Thread Robert Engels
Just Google ssh certificate authentication and you’ll find a lot of resources. > On Jun 30, 2022, at 9:29 AM, Hugh Myrie wrote: > >  > Your help is much appreciated. Security is of paramount importance so I must > take everything into consideration. I am learning so feel free to provide > us

Re: [go-nuts] ListenAndServeTLS() (pem and key files for private network)

2022-06-30 Thread Hugh Myrie
Your help is much appreciated. Security is of paramount importance so I must take everything into consideration. I am learning so feel free to provide useful feedback. On Thu, Jun 30, 2022 at 7:22 AM Robert Engels wrote: > I don’t think it needs to be that complicated just load the client public

Re: [go-nuts] ListenAndServeTLS() (pem and key files for private network)

2022-06-30 Thread Robert Engels
I don’t think it needs to be that complicated just load the client public certs into the server. Validate upon usage that the cert is still valid. Easy to authenticate clients this way. This is how ssh works with certificate based authentication. Peer to peer is a little harder but usually you g

Re: [go-nuts] ListenAndServeTLS() (pem and key files for private network)

2022-06-30 Thread Konstantin Khomoutov
On Mon, Jun 27, 2022 at 05:35:38PM -0700, Hugh Myrie wrote: > I wish to create a secure private network using a self-signed certificate > with a Go web server: See the following code block: > > // Code > err := http.ListenAndServeTLS(":"+port, "auto.org.pem", > "auto.org-key.pem", handler)

Re: [go-nuts] Shell tab-completion

2022-06-30 Thread Steve Mynott
On Thu, 30 Jun 2022 at 11:07, 'Valentin Deleplace' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Hello, is there a recommended way to achieve command line completion of > the go command with Bash and Zsh? > E.g. > go te -> go test > go bui -> go build > > I don't have that out-of-the-

[go-nuts] Shell tab-completion

2022-06-30 Thread 'Valentin Deleplace' via golang-nuts
Hello, is there a recommended way to achieve command line completion of the go command with Bash and Zsh? E.g. go te -> go test go bui -> go build I don't have that out-of-the-box, and the install page doesn't mention it. I've seen a couple of 3rd party github repo