mirror of
https://github.com/golang/go
synced 2024-11-18 06:04:53 -07:00
crypto/x509: restore support for ios tag on darwin/amd64
Fixes #38710 Change-Id: I9b210e95fd997ff53ec704c5f61110045aaa94bb Reviewed-on: https://go-review.googlesource.com/c/go/+/239559 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
parent
3e95c5b0a1
commit
72019cf312
12
src/cmd/dist/test.go
vendored
12
src/cmd/dist/test.go
vendored
@ -461,6 +461,18 @@ func (t *tester) registerTests() {
|
||||
})
|
||||
}
|
||||
|
||||
// Test the ios build tag on darwin/amd64 for the iOS simulator.
|
||||
if goos == "darwin" && !t.iOS() {
|
||||
t.tests = append(t.tests, distTest{
|
||||
name: "amd64ios",
|
||||
heading: "ios tag on darwin/amd64",
|
||||
fn: func(dt *distTest) error {
|
||||
t.addCmd(dt, "src", t.goTest(), t.timeout(300), "-tags=ios", "-run=SystemRoots", "crypto/x509")
|
||||
return nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
if t.race {
|
||||
return
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
package x509
|
||||
|
||||
//go:generate go run root_darwin_arm64_gen.go -version 55161.80.1
|
||||
//go:generate go run root_darwin_ios_gen.go -version 55161.80.1
|
||||
|
||||
import "sync"
|
||||
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !ios
|
||||
|
||||
package x509
|
||||
|
||||
// This cgo implementation exists only to support side-by-side testing by
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !ios
|
||||
|
||||
package x509
|
||||
|
||||
import (
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Code generated by root_darwin_arm64_gen.go -version 55161.80.1; DO NOT EDIT.
|
||||
// Code generated by root_darwin_ios_gen.go -version 55161.80.1; DO NOT EDIT.
|
||||
// Update the version in root.go and regenerate with "go generate".
|
||||
|
||||
// +build darwin,arm64 darwin,amd64,ios
|
||||
// +build !x509omitbundledroots
|
||||
|
||||
package x509
|
@ -4,7 +4,7 @@
|
||||
|
||||
// +build ignore
|
||||
|
||||
// Generates root_darwin_arm64.go.
|
||||
// Generates root_darwin_ios.go.
|
||||
//
|
||||
// As of iOS 13, there is no API for querying the system trusted X.509 root
|
||||
// certificates.
|
||||
@ -37,7 +37,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
var output = flag.String("output", "root_darwin_arm64.go", "file name to write")
|
||||
var output = flag.String("output", "root_darwin_ios.go", "file name to write")
|
||||
var version = flag.String("version", "", "security_certificates version")
|
||||
flag.Parse()
|
||||
if *version == "" {
|
||||
@ -156,9 +156,10 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
const header = `// Code generated by root_darwin_arm64_gen.go -version %s; DO NOT EDIT.
|
||||
const header = `// Code generated by root_darwin_ios_gen.go -version %s; DO NOT EDIT.
|
||||
// Update the version in root.go and regenerate with "go generate".
|
||||
|
||||
// +build darwin,arm64 darwin,amd64,ios
|
||||
// +build !x509omitbundledroots
|
||||
|
||||
package x509
|
@ -2,7 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin,arm64,x509omitbundledroots
|
||||
// +build darwin,arm64 darwin,amd64,ios
|
||||
// +build x509omitbundledroots
|
||||
|
||||
// This file provides the loadSystemRoots func when the
|
||||
// "x509omitbundledroots" build tag has disabled bundling a copy,
|
||||
|
@ -2,7 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin,arm64,x509omitbundledroots
|
||||
// +build darwin,arm64 darwin,amd64,ios
|
||||
// +build x509omitbundledroots
|
||||
|
||||
package x509
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user