]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: streamline BoGo testing w/ -bogo-local-dir
authorDaniel McCarney <daniel@binaryparadox.net>
Fri, 11 Jul 2025 14:42:22 +0000 (10:42 -0400)
committerDaniel McCarney <daniel@binaryparadox.net>
Mon, 6 Oct 2025 17:42:22 +0000 (10:42 -0700)
commite74b224b7c7b7511fe37686d81a6e33d40fdeb17
treeead6ac4b8d6ea8d2056cf132632e0e5d26c3ffd5
parent3a05e7b0325eb71fede880f67db63d192f2fa0e1
crypto/tls: streamline BoGo testing w/ -bogo-local-dir

If -bogo-local-dir is provided but doesn't exist, populate it with a git
checkout of the BoringSSL repo at the correct SHA.

Without any -bogo-local-dir argument the BoGo TLS handshake test will
fetch the BoringSSL source at a specific SHA as a Go module in a r/o
module directory. When debugging, or extending BoGo coverage, it's
preferable to have a mutable local copy of BoGo that the test will
use.

The pre-existing -bogo-local-dir flag offered a way to use a checkout of
BoGo but it relied on the user fetching the correct repo & revision
manually ahead of time. This commit extends the test to automatically
invoke `git` to clone the repo into the provided local dir at the
correct SHA based on the boringsslModVer const if the local dir doesn't
exist.

This leaves the user ready to make changes in local BoGo dir to aid
debugging, or to upstream as CRs to BoringSSL, and prevents using an
incorrect SHA by mistake.

Updates #72006

Change-Id: I0451a3d35203878cdf02a7587e138c3cd60d15a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/687475
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
TryBot-Bypass: Daniel McCarney <daniel@binaryparadox.net>
src/crypto/tls/bogo_shim_test.go
src/crypto/tls/handshake_test.go