Remove certificate-transparency-go dependancy

Signed-off-by: Joe Richey <joerichey@google.com>
This commit is contained in:
Joe Richey 2022-03-23 19:31:53 -07:00 committed by Joseph Richey
parent 0a9ecdcf7c
commit 03018e6828
14 changed files with 19 additions and 27 deletions

View File

@ -28,11 +28,10 @@ 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) {

View File

@ -6,6 +6,7 @@ import (
"crypto/ecdsa"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/hex"
"encoding/json"
"encoding/pem"
@ -15,7 +16,6 @@ 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"
)

View File

@ -17,12 +17,12 @@ package attest
import (
"crypto"
"crypto/x509"
"errors"
"fmt"
"io"
"strings"
"github.com/google/certificate-transparency-go/x509"
"github.com/google/go-tpm/tpm"
"github.com/google/go-tpm/tpm2"
)

View File

@ -4,9 +4,8 @@ import (
"bytes"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"testing"
"github.com/google/certificate-transparency-go/x509"
)
func TestMakeActivationBlob(t *testing.T) {

View File

@ -2,14 +2,13 @@ package internal
import (
"bytes"
"crypto/x509"
"encoding/asn1"
"encoding/binary"
"errors"
"fmt"
"io"
"unicode/utf16"
"github.com/google/certificate-transparency-go/asn1"
"github.com/google/certificate-transparency-go/x509"
)
const (

View File

@ -19,14 +19,13 @@ package attest
import (
"bytes"
"crypto/x509"
"encoding/binary"
"fmt"
"io"
"syscall"
"unsafe"
"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"

View File

@ -16,10 +16,10 @@ package attest
import (
"bytes"
"crypto/x509"
"errors"
"fmt"
"github.com/google/certificate-transparency-go/x509"
"github.com/google/go-attestation/attest/internal"
)

View File

@ -18,15 +18,14 @@ import (
"bytes"
"crypto/rsa"
"crypto/sha256"
"crypto/x509"
"encoding/asn1"
"encoding/base64"
"encoding/binary"
"fmt"
"io"
"strings"
"github.com/google/certificate-transparency-go/asn1"
"github.com/google/certificate-transparency-go/x509"
"github.com/google/go-tpm/tpm2"
"github.com/google/go-tpm/tpmutil"
)
@ -199,12 +198,12 @@ func ParseEKCertificate(ekCert []byte) (*x509.Certificate, error) {
var cert struct {
Raw asn1.RawContent
}
if _, err := asn1.UnmarshalWithParams(ekCert, &cert, "lax"); err != nil && x509.IsFatal(err) {
if _, err := asn1.UnmarshalWithParams(ekCert, &cert, "lax"); err != nil {
return nil, fmt.Errorf("asn1.Unmarshal() failed: %v, wasWrapped=%v", err, wasWrapped)
}
c, err := x509.ParseCertificate(cert.Raw)
if err != nil && x509.IsFatal(err) {
if err != nil {
return nil, fmt.Errorf("x509.ParseCertificate() failed: %v", err)
}
return c, nil

View File

@ -19,11 +19,11 @@ package attest
import (
"crypto"
"crypto/x509"
"encoding/binary"
"fmt"
"io/ioutil"
"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"

View File

@ -2,11 +2,10 @@ package attest
import (
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"fmt"
"testing"
"github.com/google/certificate-transparency-go/x509"
)
// Generated using the following command:

View File

@ -19,12 +19,12 @@ import (
"crypto"
"crypto/ecdsa"
"crypto/rsa"
"encoding/asn1"
"errors"
"fmt"
"io"
"math/big"
"github.com/google/certificate-transparency-go/asn1"
"github.com/google/go-tpm/tpm2"
"github.com/google/go-tpm/tpmutil"
)

View File

@ -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 (

View File

@ -15,13 +15,12 @@
package attributecert
import (
"crypto/x509"
"encoding/json"
"io/ioutil"
"reflect"
"strings"
"testing"
"github.com/google/certificate-transparency-go/x509"
)
func TestVerifyAttributeCert(t *testing.T) {

1
go.mod
View File

@ -3,7 +3,6 @@ module github.com/google/go-attestation
go 1.16
require (
github.com/google/certificate-transparency-go v1.1.1
github.com/google/go-cmp v0.5.7
github.com/google/go-tpm v0.3.3
github.com/google/go-tpm-tools v0.3.1