Auditor icon indicating copy to clipboard operation
Auditor copied to clipboard

feat: allow build-time overrides of attestation server url and static fingerprint override

Open cassandracomar opened this issue 1 year ago • 1 comments

pulls the attestation server url and overriden fingerprint from res/values/strings, allowing them to be overriden at AOSP/GrapheneOS build time. because the device info/fingerprint can't be known statically, this PR introduces a dynamic look up for the device info and fingerprint via a singleton that gets its context set by the main activity, avoiding null pointer issues by ensuring static accesses for Resources in AttestationProtocol.java occur as late as possible.

cassandracomar avatar Apr 23 '23 13:04 cassandracomar

Turning RemoteVerifyJob.DOMAIN constant into a BuildConfig constant would allow to simplify these changes a lot. See Apps app for an example: https://github.com/GrapheneOS/Apps/blob/9bb136db0aacfbaef8c5ffe3c8980eb582087dba/app/build.gradle.kts#L50 https://github.com/GrapheneOS/Apps/blob/9bb136db0aacfbaef8c5ffe3c8980eb582087dba/app/src/main/java/app/grapheneos/apps/core/RepoRetriever.kt#L26

muhomorr avatar Apr 23 '23 18:04 muhomorr