diff --git a/verifier/aik.go b/verifier/aik.go index 498a8d0..1e7caec 100644 --- a/verifier/aik.go +++ b/verifier/aik.go @@ -74,7 +74,7 @@ func verifyAIK20(public, creationData, attestationData, signature []byte) (*pb.A if pub.RSAParameters.KeyBits < 2048 { out.KeyTooSmall = true } - out.RocaVulnerableKey = ROCAVulnerableKey(&rsa.PublicKey{N: pub.RSAParameters.Modulus}) + out.RocaVulnerableKey = ROCAVulnerableKey(&rsa.PublicKey{N: pub.RSAParameters.Modulus()}) default: return nil, fmt.Errorf("public key of alg 0x%x not supported", pub.Type) } @@ -109,7 +109,7 @@ func verifyAIK20(public, creationData, attestationData, signature []byte) (*pb.A out.NameAttestationMismatch = !match // Check the signature over the attestation data verifies correctly. - p := rsa.PublicKey{E: int(pub.RSAParameters.Exponent), N: pub.RSAParameters.Modulus} + p := rsa.PublicKey{E: int(pub.RSAParameters.Exponent()), N: pub.RSAParameters.Modulus()} signHashConstructor, err := pub.RSAParameters.Sign.Hash.HashConstructor() if err != nil { return nil, err diff --git a/verifier/quote.go b/verifier/quote.go index 7ca036f..efddfb7 100644 --- a/verifier/quote.go +++ b/verifier/quote.go @@ -79,7 +79,7 @@ func VerifyQuote(tpmVersion tpb.TpmVersion, public, attestationData, signature [ pcrDigestMatched = bytes.Equal(compositeDigest.Sum(nil), digest) // Check the signature over the attestation data verifies correctly. - p := rsa.PublicKey{E: int(pub.RSAParameters.Exponent), N: pub.RSAParameters.Modulus} + p := rsa.PublicKey{E: int(pub.RSAParameters.Exponent()), N: pub.RSAParameters.Modulus()} signHashConstructor, err := pub.RSAParameters.Sign.Hash.HashConstructor() if err != nil { return nil, err