mirror of
https://github.com/google/go-attestation.git
synced 2024-12-18 20:47:57 +00:00
Internal change
PiperOrigin-RevId: 380881515
This commit is contained in:
parent
1b4849d2c3
commit
20a9e4b381
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
|
@ -26,10 +26,11 @@ import (
|
||||
"crypto/elliptic"
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"encoding/asn1"
|
||||
"math/big"
|
||||
"testing"
|
||||
|
||||
"github.com/google/certificate-transparency-go/x509"
|
||||
)
|
||||
|
||||
func TestSimTPM20KeyCreateAndLoad(t *testing.T) {
|
||||
|
@ -15,9 +15,9 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/google/certificate-transparency-go/x509"
|
||||
"github.com/google/go-attestation/attest"
|
||||
"github.com/google/go-attestation/attest/attest-tool/internal"
|
||||
"github.com/google/certificate-transparency-go/x509"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -4,8 +4,9 @@ import (
|
||||
"bytes"
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"testing"
|
||||
|
||||
"github.com/google/certificate-transparency-go/x509"
|
||||
)
|
||||
|
||||
func TestMakeActivationBlob(t *testing.T) {
|
||||
|
@ -348,7 +348,7 @@ func (a *AKPublic) validate20Quote(quote Quote, pcrs []PCR, nonce []byte) error
|
||||
return fmt.Errorf("attestation isn't a quote, tag of type 0x%x", att.Type)
|
||||
}
|
||||
if !bytes.Equal([]byte(att.ExtraData), nonce) {
|
||||
return fmt.Errorf("nonce didn't match: %v", err)
|
||||
return fmt.Errorf("nonce = %#v, want %#v", []byte(att.ExtraData), nonce)
|
||||
}
|
||||
|
||||
pcrByIndex := map[int][]byte{}
|
||||
|
@ -26,9 +26,9 @@ import (
|
||||
|
||||
"github.com/google/certificate-transparency-go/x509"
|
||||
|
||||
"github.com/google/go-tpm/tpmutil"
|
||||
tpmtbs "github.com/google/go-tpm/tpmutil/tbs"
|
||||
"golang.org/x/sys/windows"
|
||||
tpmtbs "github.com/google/go-tpm/tpmutil/tbs"
|
||||
"github.com/google/go-tpm/tpmutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -19,8 +19,8 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/google/certificate-transparency-go/x509"
|
||||
"github.com/google/go-attestation/attest/internal"
|
||||
"github.com/google/certificate-transparency-go/x509"
|
||||
)
|
||||
|
||||
// SecurebootState describes the secure boot status of a machine, as determined
|
||||
|
@ -24,8 +24,8 @@ import (
|
||||
|
||||
"github.com/google/certificate-transparency-go/x509"
|
||||
"github.com/google/go-tspi/attestation"
|
||||
"github.com/google/go-tspi/tspi"
|
||||
"github.com/google/go-tspi/tspiconst"
|
||||
"github.com/Comcast/gotspi/tspi"
|
||||
"github.com/Comcast/gotspi/tspiconst"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -2,10 +2,11 @@ package attest
|
||||
|
||||
import (
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"encoding/pem"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/google/certificate-transparency-go/x509"
|
||||
)
|
||||
|
||||
// Generated using the following command:
|
||||
|
@ -28,9 +28,9 @@ import (
|
||||
"io"
|
||||
"math/big"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
tpm1 "github.com/google/go-tpm/tpm"
|
||||
tpmtbs "github.com/google/go-tpm/tpmutil/tbs"
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
var wellKnownAuth [20]byte
|
||||
|
@ -9,15 +9,15 @@ package attributecert
|
||||
import (
|
||||
"bytes"
|
||||
"crypto"
|
||||
"crypto/x509"
|
||||
"crypto/x509/pkix"
|
||||
"encoding/asn1"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"time"
|
||||
|
||||
"github.com/google/go-attestation/oid"
|
||||
"github.com/google/certificate-transparency-go/asn1"
|
||||
"github.com/google/certificate-transparency-go/x509/pkix"
|
||||
"github.com/google/certificate-transparency-go/x509"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -15,12 +15,13 @@
|
||||
package attributecert
|
||||
|
||||
import (
|
||||
"crypto/x509"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/google/certificate-transparency-go/x509"
|
||||
)
|
||||
|
||||
func TestVerifyAttributeCert(t *testing.T) {
|
||||
@ -38,7 +39,7 @@ func TestVerifyAttributeCert(t *testing.T) {
|
||||
t.Fatalf("failed to parse Intel intermediate certificate: %v", err)
|
||||
}
|
||||
|
||||
for _, filename := range(testfiles) {
|
||||
for _, filename := range testfiles {
|
||||
data, err = ioutil.ReadFile(filename)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to read %s: %v", filename, err)
|
||||
|
0
attributecert/testdata/Intel_pc2.cer
vendored
Executable file → Normal file
0
attributecert/testdata/Intel_pc2.cer
vendored
Executable file → Normal file
0
attributecert/testdata/Intel_pc3.cer
vendored
Executable file → Normal file
0
attributecert/testdata/Intel_pc3.cer
vendored
Executable file → Normal file
@ -3,8 +3,6 @@ package main
|
||||
import (
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"crypto/x509/pkix"
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"flag"
|
||||
@ -14,6 +12,9 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/google/certificate-transparency-go/x509/pkix"
|
||||
"github.com/google/certificate-transparency-go/x509"
|
||||
)
|
||||
|
||||
var simulatorStatePath = flag.String("state_path", "/tmp/sim/NVRAM/00.permall", "Path to ibmswtpm state file")
|
||||
|
0
ci/setup_tests_fs.sh
Executable file → Normal file
0
ci/setup_tests_fs.sh
Executable file → Normal file
0
ci/setup_tpm12_simulator.sh
Executable file → Normal file
0
ci/setup_tpm12_simulator.sh
Executable file → Normal file
0
ci/shutdown_tpm12_simulator.sh
Executable file → Normal file
0
ci/shutdown_tpm12_simulator.sh
Executable file → Normal file
@ -59,4 +59,3 @@ var (
|
||||
var (
|
||||
CloudComputeInstanceIdentifier = []int{1, 3, 6, 1, 4, 1, 11129, 2, 1, 21}
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user