Happy to make the directory 'example' if people like that. http://codereview.appspot.com/1684051/diff/5001/6001 File src/pkg/crypto/tls/examples/generate_cert.go (right): http://codereview.appspot.com/1684051/diff/5001/6001#newcode1 ...
14 years, 9 months ago
(2010-07-01 22:11:42 UTC)
#3
I'm inclined to drop the examples directory and just leave the generate_cert program in the ...
14 years, 9 months ago
(2010-07-01 23:24:07 UTC)
#4
I'm inclined to drop the examples directory
and just leave the generate_cert program
in the main tls directory. This is like http/triv.go
being in http.
The example server should be part of the
package doc comment in the http/https.
The doc comment for crypto/tls might direct
people to http/https for the HTTPS server.
I'm not sure whether http/https merits its
own package. The http client is going to
need to do TLS too, and I had intended to
just import tls directly from http, so that
wouldn't be a new dependency.
If you wanted to make it http.ListenAndServeTLS
I think that would be fine too. The example could
be in the doc comment for ListenAndServeTLS.
See what r thinks.
I think 'examples' is an ok name but singular is fine too. What's important is ...
14 years, 9 months ago
(2010-07-01 23:25:04 UTC)
#6
I think 'examples' is an ok name but singular is fine too. What's
important is that these examples are compiled and maybe run as part of
all.bash and that they are mentioned in the package documentation and
indexed by godoc.
-rob
On Jul 1, 2010, at 4:24 PM, rsc@google.com wrote: > I'm inclined to drop the ...
14 years, 9 months ago
(2010-07-01 23:26:08 UTC)
#7
On Jul 1, 2010, at 4:24 PM, rsc@google.com wrote:
> I'm inclined to drop the examples directory
> and just leave the generate_cert program
> in the main tls directory. This is like http/triv.go
> being in http.
>
> The example server should be part of the
> package doc comment in the http/https.
that works too, but the longer one is nice in isolation. it could go
in the top directory but i don't mind the precedent. maybe triv.go
should go into an example directory too.
but see comments in other mail.
>
> The doc comment for crypto/tls might direct
> people to http/https for the HTTPS server.
>
> I'm not sure whether http/https merits its
> own package. The http client is going to
> need to do TLS too, and I had intended to
> just import tls directly from http, so that
> wouldn't be a new dependency.
>
> If you wanted to make it http.ListenAndServeTLS
> I think that would be fine too. The example could
> be in the doc comment for ListenAndServeTLS.
>
> See what r thinks.
>
>
>
> http://codereview.appspot.com/1684051/show
I'd like to discuss the example thing separately. Can we leave the example in tls ...
14 years, 9 months ago
(2010-07-01 23:29:21 UTC)
#8
I'd like to discuss the example thing separately.
Can we leave the example in tls for now and
worry about both triv (which no longer compiles)
and this example in a future CL?
On Jul 1, 2010, at 4:29 PM, Russ Cox wrote: > I'd like to discuss ...
14 years, 9 months ago
(2010-07-01 23:30:16 UTC)
#9
On Jul 1, 2010, at 4:29 PM, Russ Cox wrote:
> I'd like to discuss the example thing separately.
> Can we leave the example in tls for now and
> worry about both triv (which no longer compiles)
> and this example in a future CL?
i can't parse that, but sure, whatever.
-rob
okay, so i think: move ListenAndServeTLS into package http, dropping http/https move generate_certs.go up one ...
14 years, 9 months ago
(2010-07-01 23:38:31 UTC)
#10
okay, so i think:
move ListenAndServeTLS into package http, dropping http/https
move generate_certs.go up one directory
move server.go into the doc comment for ListenAndServeTLS.
On Thu, Jul 1, 2010 at 7:38 PM, <rsc@google.com> wrote: > move generate_certs.go up one ...
14 years, 9 months ago
(2010-07-02 15:17:58 UTC)
#11
On Thu, Jul 1, 2010 at 7:38 PM, <rsc@google.com> wrote:
> move generate_certs.go up one directory
> move server.go into the doc comment for ListenAndServeTLS.
Will do.
> move ListenAndServeTLS into package http, dropping http/https
Is the linker smart enough not to pull in unneeded code in the case
that the program imports http, but doesn't use HTTPS? The reason that
I made it a different package was to avoid bloat: big, asn1, rsa,
x509, tls is a lot.
Cheers
AGL
On Jul 2, 2010, at 8:17 AM, Adam Langley wrote: > On Thu, Jul 1, ...
14 years, 9 months ago
(2010-07-02 15:27:16 UTC)
#12
On Jul 2, 2010, at 8:17 AM, Adam Langley wrote:
> On Thu, Jul 1, 2010 at 7:38 PM, <rsc@google.com> wrote:
>> move generate_certs.go up one directory
>> move server.go into the doc comment for ListenAndServeTLS.
>
> Will do.
>
>> move ListenAndServeTLS into package http, dropping http/https
>
> Is the linker smart enough not to pull in unneeded code in the case
> that the program imports http, but doesn't use HTTPS?
Yes
> The reason that
> I made it a different package was to avoid bloat: big, asn1, rsa,
> x509, tls is a lot.
>
>
> Cheers
>
> AGL
http://codereview.appspot.com/1684051/diff/23001/24001 File src/pkg/crypto/tls/generate_cert.go (right): http://codereview.appspot.com/1684051/diff/23001/24001#newcode20 src/pkg/crypto/tls/generate_cert.go:20: } you might want to use the flags package ...
14 years, 9 months ago
(2010-07-02 17:02:11 UTC)
#18
Issue 1684051: code review 1684051: crypto/tls, http: Make HTTPS servers easier.
(Closed)
Created 14 years, 9 months ago by agl1
Modified 14 years, 9 months ago
Reviewers: r
Base URL:
Comments: 15