Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllVendors = []Vendor{VendorGMS, VendorHMS}
View Source
var ErrUnknownVendor = errors.New("safetynet: valid certificate found but not from any known safetynet vendors")
View Source
var ErrorBasicIntegrity = errors.New("basic integrity check fail")
View Source
var ErrorSafetyNetDecode = errors.New("cannot decode token")
View Source
var ErrorSafetyNetError = errors.New("safetyNet report error")
View Source
var TimeFunction = time.Now
for mocking
Functions ¶
This section is empty.
Types ¶
type Attestation ¶
type Attestation struct { Timestamp int64 `json:"timestampMs"` Nonce string `json:"nonce"` ApkPackageName string `json:"apkPackageName"` ApkDigestSHA256 string `json:"apkDigestSha256"` ApkCertificateDigestSHA256 []string `json:"apkCertificateDigestSha256"` CTSProfileMatch bool `json:"ctsProfileMatch"` BasicIntegrity bool `json:"basicIntegrity"` Advice string `json:"advice,omitempty"` Error string `json:"error,omitempty"` Vendor Vendor `json:"vendor"` }
func Validate ¶
func Validate(token string) (out Attestation, err error)
func (Attestation) GetTimestamp ¶
func (s Attestation) GetTimestamp() time.Time
Click to show internal directories.
Click to hide internal directories.