Export TLS & remove conn in request struct
This makes it possible to fully create another request outside of this module (which Hnakra will need) and has better parity with net/http.
This commit is contained in:
parent
24d70951c9
commit
f6d3c47816
@ -52,7 +52,7 @@ func fingerprint(cert *x509.Certificate) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func profile(ctx context.Context, w gemini.ResponseWriter, r *gemini.Request) {
|
func profile(ctx context.Context, w gemini.ResponseWriter, r *gemini.Request) {
|
||||||
tls := r.TLS()
|
tls := r.TLS
|
||||||
if len(tls.PeerCertificates) == 0 {
|
if len(tls.PeerCertificates) == 0 {
|
||||||
w.WriteHeader(gemini.StatusCertificateRequired, "Certificate required")
|
w.WriteHeader(gemini.StatusCertificateRequired, "Certificate required")
|
||||||
return
|
return
|
||||||