Skip to content

crypto/tls: internal error when connecting to site with abnormaly large certificate #13401

Description

@jvehent

https://10000-sans.badssl.com is a test site that serves a certificate with 10,000 SAN records for the purpose of breaking TLS clients. Go is unable to open a connection to this site, and breaks with the error:

$ go run https_break.go 
panic: Get https://10000-sans.badssl.com: local error: internal error

goroutine 1 [running]:
main.main()
    /home/ulfr/git/go-toybox/https_break.go:8 +0x6e

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/lib/go/src/runtime/asm_amd64.s:1696 +0x1
exit status 2

Source code is

package main

import "net/http"

func main() {
    _, err := http.Get("https://10000-sans.badssl.com")
    if err != nil {
        panic(err)
    }
}

I would like for this to work, but I can understand Go refusing to open a connection with such an unusual certificate. If so, maybe the failure should be enforced by a policy and the error message explicit?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions