[tls] Support build time injection for tls example

www.google.com seems to refresh certificate every 3 months. It just
broke the tls example application as it has been using fixed time so
far. The CL adds support for injecting custom/build time as the time
source. This is done by auto-generating source code for implementing the
time_t time(time_t *) C API. The time_t value to return is passed from a
gn argument, or default to build time if not specified.

CRL checking is disabled by default as the in-tree test CRLs have
already expired. This will cause load failure when build time is used.
Will consider build-time CRL download and injection for demo purpose.

Change-Id: I6d6339a6203d2f3ba2b06f8afac5af04e3a5e683
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/experimental/+/39465
Commit-Queue: Yecheng Zhao <zyecheng@google.com>
Reviewed-by: Ali Zhang <alizhang@google.com>
5 files changed
tree: d18165f3d280037ce3c2103f7bf6d4f26abc37ac
  1. applications/
  2. build_overrides/
  3. pw_board_led/
  4. pw_board_led_arduino/
  5. pw_board_led_host/
  6. pw_board_led_stm32f429i_disc1/
  7. pw_console/
  8. pw_spin_delay/
  9. pw_spin_delay_arduino/
  10. pw_spin_delay_host/
  11. pw_spin_delay_stm32f429i_disc1/
  12. targets/
  13. third_party/
  14. tools/
  15. .gitattributes
  16. .gitignore
  17. .gitmodules
  18. .gn
  19. activate.bat
  20. banner.txt
  21. bootstrap.bat
  22. bootstrap.sh
  23. BUILD.gn
  24. BUILDCONFIG.gn
  25. navbar.md
  26. PW_PLUGINS
  27. README.md
README.md

Pigweed Experimental

This repository contains experimental pigweed modules.

Repository setup

Clone this repo with --recursive to get all required submodules.

git clone --recursive https://pigweed.googlesource.com/pigweed/experimental

This will pull the Pigweed source repository into third_party/pigweed. If you already cloned but forgot to --recursive run git submodule update --init to pull all submodules.