github.com/google/trillian-examples@v0.0.0-20240520080811-0d40d35cef0e/binary_transparency/firmware/api/update_package.go (about) 1 // Copyright 2020 Google LLC. All Rights Reserved. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package api 16 17 // UpdatePackage represents an "OTA" update bundle. 18 type UpdatePackage struct { 19 // FirmwareImage is the actual firmware image itself. 20 FirmwareImage []byte 21 // ProofBundle holds the various artifacts required to validate the firmware image. 22 // It should be a serialised JSON form of the ProofBundle structure. 23 ProofBundle []byte 24 } 25 26 // ProofBundle contains the manifest and associated proofs for a given firmware image. 27 type ProofBundle struct { 28 // ManifestStatement is the json representation of an `api.SignedStatement` struct. 29 ManifestStatement []byte 30 // Checkpoint must represent a tree which includes the ManifestStatement. 31 Checkpoint []byte 32 // InclusionProof is a proof to Checkpoint for ManifestStatement. 33 InclusionProof InclusionProof 34 }