xref: /aosp_15_r20/external/pigweed/third_party/chromium_verifier/README.md (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1*61c4878aSAndroid Build Coastguard Worker# Chrome Certificate Verifier Library
2*61c4878aSAndroid Build Coastguard Worker
3*61c4878aSAndroid Build Coastguard WorkerThe folder provides targets for building the certificate verifier used by
4*61c4878aSAndroid Build Coastguard Workerchromium. The sources live in the chromium source repo. It is recommended
5*61c4878aSAndroid Build Coastguard Workerto download the repo via `pw package install chromium_verifier`, which
6*61c4878aSAndroid Build Coastguard Workerperforms a sparse checkout instead of checking out the who repo. For gn build,
7*61c4878aSAndroid Build Coastguard Workerset `dir_pw_third_party_chromium_verifier` to point to the repo path. The
8*61c4878aSAndroid Build Coastguard Workerlibrary requires `third_party/boringssl` and need to be setup first. See
9*61c4878aSAndroid Build Coastguard Worker`third_party/boringssl/README.md` for instruction. The library will primarily
10*61c4878aSAndroid Build Coastguard Workerbe used by pw_tls_client when using boringssl backend.
11*61c4878aSAndroid Build Coastguard Worker
12*61c4878aSAndroid Build Coastguard WorkerThe verifier we build for embedded target excludes the chromium metric feature.
13*61c4878aSAndroid Build Coastguard WorkerSpecifically, for the current port, we use a noop implementation for function
14*61c4878aSAndroid Build Coastguard Worker`UmaHistogramCounts10000()`. The function is originally used to generate
15*61c4878aSAndroid Build Coastguard Workerhistograms that record iteration count. For the verifier, the iteration count
16*61c4878aSAndroid Build Coastguard Workeris only used in unittest. Compiling the feature requires to bring in a
17*61c4878aSAndroid Build Coastguard Workersignificant amount of additional sources and also many system dependencies
18*61c4878aSAndroid Build Coastguard Workerincluding threading, file system, memory mapping management (sys/mman.h) etc.
19*61c4878aSAndroid Build Coastguard WorkerIt's too complicated to accomodate for embedded target.
20*61c4878aSAndroid Build Coastguard Worker
21*61c4878aSAndroid Build Coastguard WorkerHowever we do build a full version including the metric feature on Linux host
22*61c4878aSAndroid Build Coastguard Workerplatform for running native unittest, as a criterion for rolling.
23*61c4878aSAndroid Build Coastguard Worker
24*61c4878aSAndroid Build Coastguard WorkerCertain chromium sources include header `pthread.h` and use data type and
25*61c4878aSAndroid Build Coastguard Workerfunctions such as `pthread_t`, `pthread_mutex_lock` etc. Although the code
26*61c4878aSAndroid Build Coastguard Workerthe verifier executes has no reference to them, they are still needed for
27*61c4878aSAndroid Build Coastguard Workercompilation. If the target platform does not have a native POSIX thread
28*61c4878aSAndroid Build Coastguard Workerimplementation, we provide a `pthread.h` that declares the needed data types
29*61c4878aSAndroid Build Coastguard Workerand functions for build. For GN builds, simply set
30*61c4878aSAndroid Build Coastguard Worker`pw_third_party_chromium_verifier_HAS_NATIVE_PTHREAD` to false.
31