diff --git a/appattest/device_info.go b/appattest/device_info.go index a527d22..91892d6 100644 --- a/appattest/device_info.go +++ b/appattest/device_info.go @@ -56,10 +56,10 @@ type DeviceInfo struct { BuildVariant string } -// parseDeviceInfo attempts to extract DeviceInfo from the leaf certificate. +// ParseDeviceInfo attempts to extract DeviceInfo from the leaf certificate. // Returns nil if the extension is not present. Parsing is best-effort: // unrecognized or malformed fields are silently skipped. -func parseDeviceInfo(cert *x509.Certificate) *DeviceInfo { +func ParseDeviceInfo(cert *x509.Certificate) *DeviceInfo { var extValue []byte for _, ext := range cert.Extensions { if ext.Id.Equal(oidDeviceInfo) { diff --git a/appattest/verify_attestation.go b/appattest/verify_attestation.go index 1a33dac..67962a7 100644 --- a/appattest/verify_attestation.go +++ b/appattest/verify_attestation.go @@ -135,7 +135,7 @@ func VerifyAttestationPure(in *VerifyAttestationInputPure) (VerifyAttestationOut BundleDigest: authenticatorData.RelayingPartyHash, KeyID: computedPubkeyHash[:], - DeviceInfo: parseDeviceInfo(leafCert), + DeviceInfo: ParseDeviceInfo(leafCert), }, nil }