Fix bootstrap/PR63632
[official-gcc.git] / libgo / go / crypto / x509 / root_darwin.go
blob2a61d36eaeaf2a29bfaccfd3139f834e538f6dec
1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 package x509
7 import "os/exec"
9 func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate, err error) {
10 return nil, nil
13 func execSecurityRoots() (*CertPool, error) {
14 cmd := exec.Command("/usr/bin/security", "find-certificate", "-a", "-p", "/System/Library/Keychains/SystemRootCertificates.keychain")
15 data, err := cmd.Output()
16 if err != nil {
17 return nil, err
20 roots := NewCertPool()
21 roots.AppendCertsFromPEM(data)
22 return roots, nil