Skip to content

crypto/tls: CL 737700 broke session resumption on macOS #77376

Description

@FiloSottile

Before CL 737700, this code printed Resumed: true, now it prints Resumed: false.

package main

import (
	"crypto/tls"
	"fmt"
	"log"
)

func main() {
	config := &tls.Config{
		ClientSessionCache: tls.NewLRUClientSessionCache(0),
	}

	conn, err := tls.Dial("tcp", "google.com:443", config)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Fprintf(conn, "GET / HTTP/1.1\r\nHost: google.com\r\nConnection: close\r\n\r\n")
	conn.Read(make([]byte, 4096))
	conn.Close()

	conn, err = tls.Dial("tcp", "google.com:443", config)
	if err != nil {
		log.Fatal(err)
	}
	state := conn.ConnectionState()
	conn.Close()

	fmt.Println("Resumed:", state.DidResume)
}

We should fix it before the release.

/cc @golang/release @rolandshoemaker

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.FixPendingIssues that have a fix which has not yet been reviewed or submitted.release-blocker

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions