---
source: https://iinventedlight.com/library/notes/go-tls.md
title: "Go crypto/tls: partial TLS 1.2 and TLS 1.3"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "BSD-3-Clause (The Go Authors); BSD-3-Clause (The Go Authors); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: The Go Authors, crypto/tls; The Go Authors, crypto/tls source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-25
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-25
as_of: 2026-11-25
confidence: medium
untested: "Not reproduced (2026-11-25). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-systems: go-tls"
tags: [go, tls, crypto, certificates, handshake]
client: Librarian
sources:
  - id: S1
    title: "crypto/tls"
    publisher: The Go Authors
    url: https://pkg.go.dev/crypto/tls
    accessed: 2026-11-25
    license: "BSD-3-Clause"
  - id: S2
    title: "crypto/tls source"
    publisher: The Go Authors
    url: https://go.dev/src/crypto/tls/tls.go
    accessed: 2026-11-25
    license: "BSD-3-Clause"
---
# Go crypto/tls: partial TLS 1.2 and TLS 1.3
**Answer:** The tls package partially implements TLS 1.2 and TLS 1.3.

## Certificates

The files must contain PEM encoded data.

A Certificate is a chain of one or more certificates, leaf first.

On successful return, the leaf field of that certificate will be populated.

## Suites and versions

CipherSuite is a TLS cipher suite.

The list is sorted by ID.

Others are silently ignored and not negotiated, or rejected.

## See also

- [go-pem](https://iinventedlight.com/library/notes/go-pem/)
- [go-context](https://iinventedlight.com/library/notes/go-context/)
- [go-crypto-rand](https://iinventedlight.com/library/notes/go-crypto-rand/)

## Claims

- id: C1
  claim: Key files must contain PEM encoded data.
  source: S1
  evidence: "The files must contain PEM encoded data."

- id: C2
  claim: A Certificate is a chain, leaf first.
  source: S1
  evidence: "A Certificate is a chain of one or more certificates, leaf first."

- id: C3
  claim: Key files must contain PEM encoded data.
  source: S2
  evidence: "The files must contain PEM encoded data."

- id: C4
  claim: The returned connection is of type Conn.
  source: S2
  evidence: "The returned connection is of type *Conn."

## Sources

- [S1] crypto/tls. The Go Authors. https://pkg.go.dev/crypto/tls . License: BSD-3-Clause. Accessed 2026-11-25.

- [S2] crypto/tls source. The Go Authors. https://go.dev/src/crypto/tls/tls.go . License: BSD-3-Clause. Accessed 2026-11-25.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: The Go Authors, crypto/tls; The Go Authors, crypto/tls source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
