diff options
author | cajun-rat <p@beta16.co.uk> | 2017-09-13 15:57:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-13 15:57:45 +0200 |
commit | 1f7c727d507146b39ccf443f09cc68237cc79d5c (patch) | |
tree | df8734b4dd41df5546e6b7276ecdb94180945856 /classes | |
parent | c32010321f84b500dab86d3c935138306244c539 (diff) | |
parent | 2712c0511fd997b91b1568c2a3bac6ff5e362d03 (diff) | |
download | meta-updater-1f7c727d507146b39ccf443f09cc68237cc79d5c.tar.gz |
Merge pull request #140 from advancedtelematic/feat/PRO-3805/cert_install
Hacky ability to provide client credentials and install them on the device
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image_types_ostree.bbclass | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 3c378fe..97da1db 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -146,6 +146,25 @@ IMAGE_CMD_ostree () { | |||
146 | cp ${SOTA_SECONDARY_ECUS} var/sota/ecus | 146 | cp ${SOTA_SECONDARY_ECUS} var/sota/ecus |
147 | fi | 147 | fi |
148 | 148 | ||
149 | # Deploy client certificate and key. | ||
150 | if [ -n "${SOTA_CLIENT_CERTIFICATE}" ]; then | ||
151 | if [ -e ${SOTA_CLIENT_CERTIFICATE} ]; then | ||
152 | mkdir -p var/sota/token | ||
153 | cp ${SOTA_CLIENT_CERTIFICATE} var/sota/token/ | ||
154 | fi | ||
155 | fi | ||
156 | if [ -n "${SOTA_CLIENT_KEY}" ]; then | ||
157 | if [ -e ${SOTA_CLIENT_KEY} ]; then | ||
158 | mkdir -p var/sota/token | ||
159 | cp ${SOTA_CLIENT_KEY} var/sota/token/ | ||
160 | fi | ||
161 | fi | ||
162 | if [ -n "${SOTA_ROOT_CA}" ]; then | ||
163 | if [ -e ${SOTA_ROOT_CA} ]; then | ||
164 | cp ${SOTA_ROOT_CA} var/sota/ | ||
165 | fi | ||
166 | fi | ||
167 | |||
149 | # Creating boot directories is required for "ostree admin deploy" | 168 | # Creating boot directories is required for "ostree admin deploy" |
150 | 169 | ||
151 | mkdir -p boot/loader.0 | 170 | mkdir -p boot/loader.0 |