Simple interface for Mbed Cloud Client
Embed:
(wiki syntax)
Show/hide line numbers
kcm_status.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_STATUS_H__ 00018 #define __KCM_STATUS_H__ 00019 00020 #ifdef __cplusplus 00021 extern "C" { 00022 #endif 00023 00024 /** 00025 * @file kcm_status.h 00026 * \brief Keys and configuration manager (KCM) status/error codes. 00027 * This list may grow as needed. 00028 */ 00029 00030 typedef enum { 00031 KCM_STATUS_SUCCESS, //!< Operation completed successfully. 00032 KCM_STATUS_ERROR, //!< Operation ended with an unspecified error. 00033 KCM_STATUS_INVALID_PARAMETER, //!< A parameter provided to the function was invalid. 00034 KCM_STATUS_INSUFFICIENT_BUFFER, //!< The provided buffer size was insufficient for the required output. 00035 KCM_STATUS_OUT_OF_MEMORY, //!< An out-of-memory condition occurred. 00036 KCM_STATUS_ITEM_NOT_FOUND, //!< The item was not found in the storage. 00037 KCM_STATUS_META_DATA_NOT_FOUND, //!< The meta data was not found in the file. 00038 KCM_STATUS_META_DATA_SIZE_ERROR, //!< The meta data found but the size is different then expected. 00039 KCM_STATUS_FILE_EXIST, //!< Trying to store an item that is already in the storage. 00040 KCM_STATUS_NOT_PERMITTED, //!< Trying to access an item without proper permissions. 00041 KCM_STATUS_STORAGE_ERROR, //!< File error occurred. 00042 KCM_STATUS_ITEM_IS_EMPTY, //!< The data of current item is empty. 00043 KCM_STATUS_INVALID_FILE_VERSION, //!< Invalid file version, the file can not be read 00044 KCM_STATUS_FILE_CORRUPTED, //!< File data corrupted, the file can not be read 00045 KCM_STATUS_FILE_NAME_CORRUPTED, //!< File name corrupted, the file can not be read 00046 KCM_STATUS_INVALID_FILE_ACCESS_MODE, //!< Invalid file access mode 00047 KCM_STATUS_UNKNOWN_STORAGE_ERROR, //!< KCM can not translate current storage error 00048 KCM_STATUS_NOT_INITIALIZED, //!< KCM did not initialized. 00049 KCM_STATUS_CLOSE_INCOMPLETE_CHAIN, //!< Closing KCM chain with less certificates than declared in create 00050 KCM_STATUS_INVALID_CHAIN, //!< KCM invalid chain detected. 00051 KCM_STATUS_INVALID_NUM_OF_CERT_IN_CHAIN, //!< Operation failed due to invalid number of certificates. 00052 KCM_STATUS_FILE_NAME_TOO_LONG, //!< Provided a file name that is longer than permitted. 00053 KCM_CRYPTO_STATUS_UNSUPPORTED_HASH_MODE, //!< Operation was called with unsupported hash mode. 00054 KCM_CRYPTO_STATUS_PARSING_DER_PRIVATE_KEY, //!< Operation failed to parse private der key. 00055 KCM_CRYPTO_STATUS_PARSING_DER_PUBLIC_KEY, //!< Operation failed to parse public der key. 00056 KCM_CRYPTO_STATUS_PK_KEY_INVALID_FORMAT, //!< Operation failed due to invalid pk key format. 00057 KCM_CRYPTO_STATUS_INVALID_PK_PUBKEY, //!< Operation failed due to invalid pk public key. 00058 KCM_CRYPTO_STATUS_ECP_INVALID_KEY, //!< Operation failed due to invalid ECP key. 00059 KCM_CRYPTO_STATUS_PK_KEY_INVALID_VERSION, //!< Operation failed due to invalid pk version of key. 00060 KCM_CRYPTO_STATUS_PK_PASSWORD_REQUIRED, //!< Operation failed due to missing password. 00061 KCM_CRYPTO_STATUS_PRIVATE_KEY_VERIFICATION_FAILED, //!< Operation failed to verify private key. 00062 KCM_CRYPTO_STATUS_PUBLIC_KEY_VERIFICATION_FAILED, //!< Operation failed to verify public key. 00063 KCM_CRYPTO_STATUS_PK_UNKNOWN_PK_ALG, //!< Operation failed due to unknown pk algorithm, 00064 KCM_CRYPTO_STATUS_UNSUPPORTED_CURVE, //!< Unsupported curve. 00065 KCM_CRYPTO_STATUS_PARSING_DER_CERT, //!< Operation failed to parse der certificate. 00066 KCM_CRYPTO_STATUS_CERT_EXPIRED, //!< Certificate validity is expired. 00067 KCM_CRYPTO_STATUS_CERT_FUTURE, //!< Certificate validity starts in future. 00068 KCM_CRYPTO_STATUS_CERT_MD_ALG, //!< Certificate with bad MD algorithm. 00069 KCM_CRYPTO_STATUS_CERT_PUB_KEY_TYPE, //!< Certificate with unsupported public key PK type. 00070 KCM_CRYPTO_STATUS_CERT_PUB_KEY, //!< Certificate with bad public key data (size or curve). 00071 KCM_CRYPTO_STATUS_CERT_NOT_TRUSTED, //!< Certificate is not trusted. 00072 KCM_CRYPTO_STATUS_INVALID_X509_ATTR, //!< Certificate with bad x509 attribute 00073 KCM_CRYPTO_STATUS_VERIFY_SIGNATURE_FAILED, //!< Operation failed to check the signature. 00074 KCM_CRYPTO_STATUS_INVALID_MD_TYPE, //!< Operation failed in check of ecc md type. 00075 KCM_CRYPTO_STATUS_FAILED_TO_WRITE_SIGNATURE, //!< Operation failed to calculate signature. 00076 KCM_MAX_STATUS, 00077 } kcm_status_e ; 00078 00079 //The macro defined for backward compatibility. Will be deprecated. 00080 #define KCM_STATUS_ESFS_ERROR KCM_STATUS_STORAGE_ERROR 00081 00082 #ifdef __cplusplus 00083 } 00084 #endif 00085 00086 #endif //__KCM_STATUS_H__
Generated on Tue Jul 12 2022 19:01:34 by 1.7.2