On Sunday, 29 November 2020 at 22:09:24 UTC+1 Jeroen N. Witmond wrote:

>
> In trying to find out how to do this I came across (closed) 
> https://github.com/golang/go/issues/19900 As a result I found another way 
> to invoke it: go run `locate generate_cert.go` host 127.0.0.1 
> --rsa-bits=2048 --ca 
>
 
> Should the comment in the example of 
https://golang.org/pkg/net/http/#example_ListenAndServeTLS be changed to be 
more exact in the way crypto/tls/generate_cert.go can be 
> invoked? Or should crypto/tls/generate_cert.go not be referred to at all? 

I think rsc's comment in the issue says it all:

> I don't think we have committed to writing a cert generation tool 
appropriate for production use. The generate_cert.go program is a simple 
program for writing tests. 

Typically, you would use openssl to generate production certs. You could 
use the functionality in `crypto/tls` to write your own  tool, though. 
And if you want to distribute a binary, 'go build `locate 
generate_cert.go`' (taking into account the caveat about more than one file 
with that name mentioned above.)

My feeling is that the documentation in  ListenAndServeTLS (which is an 
inline comment in example code) is meant more as a helpful hint on how to 
generate a quick and dirty certificate for testing.
    -tim
 

>
>
>
> Should I open an issue about this?
>
> Jeroen.
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/36856340-5c62-46f7-9a9f-a657de22068bn%40googlegroups.com.

Reply via email to