blob: d25517a394beca2d53053990d9bc1b5119769961 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
/*
* key-manager
*
* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
*
* Contact: Bumjin Im <bj.im@samsung.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*
*/
#ifndef KEY_MANAGER_H
#define KEY_MANAGER_H
#include <sys/types.h>
/**
* @file key-manager.h
* @version 1.0
* @brief This file contains APIs of the Central Key Manager
*/
/**
* @defgroup SecurityFW
* @{
*
* @defgroup KEY_MANAGER Central Key Manager
* @version 1.0
* @brief Central Key Manager client library functions
*
*/
/**
* @addtogroup KEY_MANAGER
* @{
*/
/**
* \name Return Codes
* exported by the foundation API.
* result codes begin with the start error code and extend into negative direction.
* @{
*/
#define KEY_MANAGER_API_SUCCESS 0
/*! \brief indicating the result of the one specific API is successful */
#define KEY_MANAGER_API_ERROR_SOCKET -1
/*! \brief indicating the socket between client and Central Key Manager failed */
#define KEY_MANAGER_API_ERROR_BAD_REQUEST -2
/*! \brief indicating the response from Central Key Manager is malformed */
#define KEY_MANAGER_API_ERROR_BAD_RESPONSE -3
/*! \brief indicating the transmitting request failed */
/* deprecated unused */
#define KEY_MANAGER_API_ERROR_SEND_FAILED -4
/*! \brief indicating the receiving response failed */
/* deprecated unused */
#define KEY_MANAGER_API_ERROR_RECV_FAILED -5
/*! \brief indicating the authentication between client and manager failed */
#define KEY_MANAGER_API_ERROR_AUTHENTICATION_FAILED -6
/*! \brief indicating the API's input parameter is malformed */
#define KEY_MANAGER_API_ERROR_INPUT_PARAM -7
/*! \brief indicating the output buffer size which is passed as parameter is too small */
#define KEY_MANAGER_API_ERROR_BUFFER_TOO_SMALL -8
/*! \brief indicating system is running out of memory state */
#define KEY_MANAGER_API_ERROR_OUT_OF_MEMORY -9
/*! \brief indicating the access has been denied by Central Key Manager */
#define KEY_MANAGER_API_ERROR_ACCESS_DENIED -10
/*! \brief indicating Central Key Manager has been failed for some reason */
#define KEY_MANAGER_API_ERROR_SERVER_ERROR -11
/*! \brief indicating getting smack label from socket failed */
#define KEY_MANAGER_API_ERROR_GETTING_SOCKET_LABEL_FAILED -12
/*! \brief indicating getting smack label from file failed */
#define KEY_MANAGER_API_ERROR_GETTING_FILE_LABEL_FAILED -13
/*! \brief indicating setting smack label for file failed */
#define KEY_MANAGER_API_ERROR_SETTING_FILE_LABEL_FAILED -14
/*! \brief indicating the error with unknown reason */
#define KEY_MANAGER_API_ERROR_UNKNOWN -255
/** @}*/
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
/**
* @}
*/
/**
* @}
*/
#endif
|