Simulated product dispenser
Fork of mbed-cloud-workshop-connect-HTS221 by
fcc_bundle_handler.h
00001 // ---------------------------------------------------------------------------- 00002 // Copyright 2016-2017 ARM Ltd. 00003 // 00004 // Licensed under the Apache License, Version 2.0 (the "License"); 00005 // you may not use this file except in compliance with the License. 00006 // You may obtain a copy of the License at 00007 // 00008 // http://www.apache.org/licenses/LICENSE-2.0 00009 // 00010 // Unless required by applicable law or agreed to in writing, software 00011 // distributed under the License is distributed on an "AS IS" BASIS, 00012 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 // See the License for the specific language governing permissions and 00014 // limitations under the License. 00015 // ---------------------------------------------------------------------------- 00016 00017 #ifndef __FCC_BUNDLE_HANDLER_H__ 00018 #define __FCC_BUNDLE_HANDLER_H__ 00019 00020 #include <stdlib.h> 00021 #include <inttypes.h> 00022 #include "fcc_status.h" 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 /** Decodes and processes an inbound device configuration bundle created by FCU. 00029 * Also creates an outbound bundle that should be sent to FCU. 00030 * The function assumes that the bundle includes four groups represented as cbor maps. 00031 * The names of the groups are `SchemeVersion`, `Keys`, `Certificates` and `ConfigParams`. 00032 * Each group contains a list of items, and for each item, there are a number of relevant parameters. 00033 * 00034 * @param encoded_bundle The encoded FCU bundle that is written into a secure storage. 00035 * @param encoded_blob_size The encoded FCU bundle size in bytes. 00036 * @param bundle_response_out The encoded outbound bundle. It may contain data such as CSR and different types of key schemes. 00037 * The response associates a descriptive error in case of a fault. Will be NULL if response not created successfully. 00038 * @param bundle_response_size_out The encoded outbound bundle size in bytes. 00039 * 00040 * @return 00041 * FCC_STATUS_SUCCESS in case of success or one of the `::fcc_status_e` errors otherwise. 00042 */ 00043 fcc_status_e fcc_bundle_handler(const uint8_t *encoded_bundle, size_t encoded_bundle_size, uint8_t **bundle_response_out, size_t *bundle_response_size_out); 00044 #ifdef __cplusplus 00045 } 00046 #endif 00047 00048 #endif //__FCC_BUNDLE_HANDLER_H__
Generated on Tue Jul 12 2022 19:12:12 by 1.7.2