Simple interface for Mbed Cloud Client

Dependents:  

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers kcm_defs.h Source File

kcm_defs.h

Go to the documentation of this file.
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 __KCM_DEFS_H__
00018 #define __KCM_DEFS_H__
00019 
00020 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023 
00024 /**
00025 * @file kcm_defs.h
00026 *  \brief Keys and configuration manager (KCM) definitions.
00027 */
00028 
00029 /**
00030 * KCM item types
00031 */
00032 typedef enum {
00033     KCM_PRIVATE_KEY_ITEM,          //!< KCM private key item type. KCM Supports ECC keys with curves defined in palGroupIndex_t(pal_Crypto.h)
00034     KCM_PUBLIC_KEY_ITEM,           //!< KCM public key item type.  KCM Supports ECC keys with curves defined in palGroupIndex_t(pal_Crypto.h)
00035     KCM_SYMMETRIC_KEY_ITEM,        //!< KCM symmetric key item type.
00036     KCM_CERTIFICATE_ITEM,          //!< KCM certificate item type. Supported x509 certificates in der format.
00037     KCM_CONFIG_ITEM,               //!< KCM configuration parameter item type.
00038     KCM_LAST_ITEM                  //!< KCM not defined item type.
00039 } kcm_item_type_e;
00040 
00041 /**
00042 * Security descriptor - contains different ACLs such as remote ACL, local ACL and audit.
00043 * Currently defined to `void*.`
00044 * May be changed in the future.
00045 */
00046 typedef void* kcm_security_desc_s;
00047 
00048 #ifndef __DOXYGEN__
00049 /**
00050 * CryptoKeyScheme structure.
00051 * Currently defined to void*.
00052 * May be changed in the future.
00053 */
00054 typedef void* kcm_crypto_key_scheme_s;
00055 
00056 #endif //#ifndef __DOXYGEN__
00057 
00058 
00059 #define KCM_MAX_FILENAME_SIZE  1012
00060 
00061 #define KCM_MAX_NUMBER_OF_CERTITICATES_IN_CHAIN 5
00062 
00063 typedef void* kcm_cert_chain_handle;
00064 
00065 
00066 #ifdef __cplusplus
00067 }
00068 #endif
00069 
00070 #endif //__KCM_DEFS_H__