Skip to content

crypto/tls: broken link in Config.KeyLogWriter docs  #63331

@rhysh

Description

@rhysh

It looks like the docs for the NSS key_log_format have moved permanently, in early 2022: mdn/content#12731

The link from crypto/tls.Config.KeyLogWriter points to a page that doesn't redirect to a new permanent home, and instead shows a "404 Not Found" message.

https://firefox-source-docs.mozilla.org/security/nss/index.html mentions mozilla_projects_nss_key_log_format in a section with the warning "References below this point are part of the deprecated documentation and will be ported in the future.", but does not include a link to the new home.

I'm not sure where the current home for that documentation is. It looks like the link in Go's documentation has been broken for a while, and that the owner of those external docs may not intend to repair it. Go's docs should point to a reputable source for the format specification.

What version of Go are you using (go version)?

$ go1.21 version
go version go1.21.1 darwin/arm64

Does this issue reproduce with the latest release?

Yes, and also in the development branch.

What operating system and processor architecture are you using (go env)?

N/A

What did you do?

Read docs for crypto/tls.Config.KeyLogWriter, tried to visit the reference at https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Key_Log_Format .

$ go1.21 doc crypto/tls.Config.KeyLogWriter
package tls // import "crypto/tls"

type Config struct {
    // KeyLogWriter optionally specifies a destination for TLS master
    // secrets in NSS key log format that can be used to allow external
    // programs such as Wireshark to decrypt TLS connections. See
    // https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Key_Log_Format.
    // Use of KeyLogWriter compromises security and should only be used for debugging.
    KeyLogWriter io.Writer

    // ... other fields elided ...
}

See also https://pkg.go.dev/crypto/tls@master#Config

And for what it's worth, https://docs.rs/rustls/latest/rustls/trait.KeyLog.html#required-methods which includes an identical link.

What did you expect to see?

Documentation for the resulting key log entry format.

What did you see instead?

A redirect to https://firefox-source-docs.mozilla.org/security/nss/legacy/key_log_format/index.html, resulting in:

404 Not Found
Code: NoSuchKey
Message: The specified key does not exist.
Key: security/nss/legacy/key_log_format/index.html
RequestId: 9E8NJMXRE2NNZGDF
HostId: Tb4D2Wi5Yh7dkbQonEOgbBePK/D5cmZ/UN1oOFQrBdtisJ3ybZQJVTOFSPMcyBWfFIgqYzXOdtI=

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions