diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2019-08-01 10:45:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-01 10:45:22 +0200 |
commit | cf559d5857242b458720efa781a8e9a2127b1e1c (patch) | |
tree | afc5abab4acc75bb16364190d94ba8d7733ae28d /recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb | |
parent | f13dd347107648176bc54458ce65c9cdf68730c8 (diff) | |
parent | 672fcc51d92522c8e2de794ef561e8dd281f7f20 (diff) | |
download | meta-updater-cf559d5857242b458720efa781a8e9a2127b1e1c.tar.gz |
Merge pull request #568 from advancedtelematic/feat/OTA-3115/Dont-patch-credentials
feat/OTA-3155/Dont-patch-credentials
Diffstat (limited to 'recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb')
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb b/recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb index dbb5fde..2701c07 100644 --- a/recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb +++ b/recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb | |||
@@ -14,14 +14,17 @@ require credentials.inc | |||
14 | do_install() { | 14 | do_install() { |
15 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 15 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
16 | install -m 0700 -d ${D}${localstatedir}/sota | 16 | install -m 0700 -d ${D}${localstatedir}/sota |
17 | cp "${SOTA_PACKED_CREDENTIALS}" ${D}${localstatedir}/sota/sota_provisioning_credentials.zip | 17 | # root.json contains the root metadata for bootstrapping the Uptane metadata verification process. |
18 | # Device should not be able to push data to treehub | 18 | # autoprov.url has the URL to the device gateway on the server, which is where we send most of our requests. |
19 | zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip treehub.json | 19 | # autoprov_credentials.p12 contains the shared provisioning credentials. |
20 | # Device has no use for the API Gateway. Remove if present. See: | 20 | for var in root.json autoprov.url autoprov_credentials.p12; do |
21 | # https://github.com/advancedtelematic/ota-plus-server/pull/1913/ | 21 | if unzip -l "${SOTA_PACKED_CREDENTIALS}" $var > /dev/null; then |
22 | if unzip -l ${D}${localstatedir}/sota/sota_provisioning_credentials.zip api_gateway.url > /dev/null; then | 22 | unzip "${SOTA_PACKED_CREDENTIALS}" $var -d ${T} |
23 | zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip api_gateway.url | 23 | zip -mj -q ${D}${localstatedir}/sota/sota_provisioning_credentials.zip ${T}/$var |
24 | fi | 24 | else |
25 | bbwarn "$var is missing from credentials.zip" | ||
26 | fi | ||
27 | done | ||
25 | fi | 28 | fi |
26 | } | 29 | } |
27 | 30 | ||