The in-memory keyring cannot enforce constraint extensions, so silently accepting a key that carries them gave callers a false sense of restriction. Refuse keys with constraint extensions instead: a key whose constraints cannot be enforced must not be loaded. This behavior is consistent with OpenSSH. This is a deliberate behavior change: keyring.Add previously accepted and ignored ConstraintExtensions and now returns an error. This issue was found during a security audit by NCC Group Cryptography Services, sponsored by Teleport. Fixes CVE-2026-39832 Fixes golang/go#79435 Change-Id: I6ca4f1c29f8edfabb287fe07299641f70896d5fe Reviewed-on: https://go-review.googlesource.com/c/crypto/+/778641 Auto-Submit: Neal Patel <nealpatel@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Neal Patel <neal@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Neal Patel <nealpatel@google.com>