blockedLinknames was updated in CL 635676 after the lib/fips140 zip
mechanism was last tested. linknames from crypto/internal/fips140/v1.0.0
need to be allowed if they'd be allowed from crypto/internal/fips140.
Change-Id: I6a6a4656022118d4739ae14831f2ad721951c192
Reviewed-on: https://go-review.googlesource.com/c/go/+/645195
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
if pkg == p {
return // pkg is allowed
}
+ // crypto/internal/fips140/vX.Y.Z/... is the frozen version of
+ // crypto/internal/fips140/... and is similarly allowed.
+ if strings.HasPrefix(pkg, "crypto/internal/fips140/v") {
+ parts := strings.Split(pkg, "/")
+ parts = append(parts[:3], parts[4:]...)
+ pkg := strings.Join(parts, "/")
+ if pkg == p {
+ return
+ }
+ }
}
error()
}