Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions appattest/device_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion appattest/verify_attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func VerifyAttestationPure(in *VerifyAttestationInputPure) (VerifyAttestationOut
BundleDigest: authenticatorData.RelayingPartyHash,
KeyID: computedPubkeyHash[:],

DeviceInfo: parseDeviceInfo(leafCert),
DeviceInfo: ParseDeviceInfo(leafCert),
}, nil
}

Expand Down