Skip to content

Commit

Permalink
kobo: add CA certs for https resources
Browse files Browse the repository at this point in the history
Used the Mozilla CA trust list to validate download site
Fixes issue #871
  • Loading branch information
lordfolken committed May 19, 2022
1 parent 3b7eacb commit 33108d5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS.txt
Expand Up @@ -21,6 +21,8 @@ Version 7.24 - not yet released
- new default fonts
* XCVario/Borgelt
- revert cruise/circling mode change
* Kobo
- add ca certificates for https downloads

Version 7.23 - 2022/02/10
* user interface
Expand Down
16 changes: 14 additions & 2 deletions build/kobo.mk
Expand Up @@ -82,16 +82,27 @@ THIRDPARTY_TOOL_FILES = $(addprefix $(THIRDPARTY_LIBS_ROOT)/bin/,$(THIRDPARTY_TO

KOBO_KERNEL_DIR = /opt/kobo/kernel

CA_URL = https://curl.se/ca/cacert-2022-04-26.pem
CA_ALTERNATIVE_URL = $(CA_URL)
CA_MD5 = aa5ac583708ca35225ac2d230f4acb62

CA_DOWNLOAD = $(DOWNLOAD_DIR)/$(notdir $(CA_URL))

$(CA_DOWNLOAD): | $(DOWNLOAD_DIR)/dirstamp
@$(NQ)echo " GET $@"
$(Q)./build/download.py $(CA_URL) $(CA_ALTERNATIVE_URL) $(CA_MD5) $(DOWNLOAD_DIR)

# /mnt/onboard/.kobo/KoboRoot.tgz is a file that is picked up by
# /etc/init.d/rcS, extracted to / on each boot; we can use it to
# install XCSoar
$(TARGET_OUTPUT_DIR)/KoboRoot.tgz: $(XCSOAR_BIN) \
$(KOBO_MENU_BIN) $(KOBO_POWER_OFF_BIN) \
$(BITSTREAM_VERA_FILES) \
$(topdir)/kobo/inittab $(topdir)/kobo/rcS $(topdir)/kobo/udev.rules
$(topdir)/kobo/inittab $(topdir)/kobo/rcS $(topdir)/kobo/udev.rules \
$(CA_DOWNLOAD)
@$(NQ)echo " TAR $@"
$(Q)rm -rf $(@D)/KoboRoot
$(Q)install -m 0755 -d $(@D)/KoboRoot/etc/udev/rules.d $(@D)/KoboRoot/opt/xcsoar/bin $(@D)/KoboRoot/opt/xcsoar/lib/kernel $(@D)/KoboRoot/opt/xcsoar/share/fonts
$(Q)install -m 0755 -d $(@D)/KoboRoot/etc/udev/rules.d $(@D)/KoboRoot/opt/xcsoar/bin $(@D)/KoboRoot/opt/xcsoar/lib/kernel $(@D)/KoboRoot/opt/xcsoar/share/fonts $(@D)/KoboRoot/etc/ssl/certs
$(Q)install -m 0755 $(XCSOAR_BIN) $(KOBO_MENU_BIN) $(KOBO_POWER_OFF_BIN) $(topdir)/kobo/rcS $(@D)/KoboRoot/opt/xcsoar/bin
$(Q)install -m 0755 --strip --strip-program=$(STRIP) $(THIRDPARTY_TOOL_FILES) $(@D)/KoboRoot/opt/xcsoar/bin
$(Q)if test -f $(KOBO_KERNEL_DIR)/uImage.kobo; then install -m 0644 $(KOBO_KERNEL_DIR)/uImage.kobo $(@D)/KoboRoot/opt/xcsoar/lib/kernel; fi
Expand All @@ -104,6 +115,7 @@ $(TARGET_OUTPUT_DIR)/KoboRoot.tgz: $(XCSOAR_BIN) \
$(Q)install -m 0644 $(topdir)/kobo/inittab $(@D)/KoboRoot/etc
$(Q)install -m 0644 $(topdir)/kobo/udev.rules $(@D)/KoboRoot/etc/udev/rules.d/99-xcsoar.rules
$(Q)install -m 0644 $(BITSTREAM_VERA_FILES) $(@D)/KoboRoot/opt/xcsoar/share/fonts
$(Q)install -T -m 0644 $(CA_DOWNLOAD) $(@D)/KoboRoot/etc/ssl/certs/ca-certificates.crt
$(Q)fakeroot tar czfC $@ $(@D)/KoboRoot .

endif

0 comments on commit 33108d5

Please sign in to comment.