I've figured out why this is not possible. The tls.Config used by
ListenAndServe is very minimal and there is no way to alter the auth
settings. This change
# hg diff
diff -r 43cf9b39b647 src/pkg/net/http/server.go
--- a/src/pkg/net/http/server.go Wed Feb 15 14:41:47 2012 +1100
+++ b/src/pkg/net/http/server.go Mon Feb 20 16:28:24 2012 +1030
@@ -1124,6 +1124,7 @@
config := &tls.Config{
Rand: rand.Reader,
NextProtos: []string{"http/1.1"},
+ ClientAuth: tls.RequireAnyClientCert,
}
var err error
altered the behaviour so that I could get client certs. Is there any
possibility that this could be changed in the API rather than having
to hack at the library to do reasonably sane things?
thanks
On Feb 20, 11:04 am, kortschak <
dan.kortsc...@adelaide.edu.au> wrote:
> Having had a further look it's something that comes from using net/
> http.
>
> Here is a comparison of net/http and raw tlshttps://
gist.github.com/1866829