2 * Copyright (c) 2013 TRUSTONIC LIMITED
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the TRUSTONIC LIMITED nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 #ifndef ROOTPAERRORS_H
33 #define ROOTPAERRORS_H
37 typedef uint32_t rootpaerror_t
;
40 NOTE to the maintainer. These values and documentation needs to be in line with the ones in CommandResult.java
45 No errors detected, successful execution.
47 #define ROOTPA_OK 0x00000000
50 Client has requested unsupported CMP command or command that it can not execute via the used interface.
51 Possible steps to recover: send only supported CMP commands or update to RootPA that supports handling the particular command in the used interface.
53 #define ROOTPA_COMMAND_NOT_SUPPORTED 0x00000001
54 #define STRING_ROOTPA_COMMAND_NOT_SUPPORTED "COMMAND_NOT_SUPPORTED_ERROR"
57 Either rootpa is locked by another client, or the client requests lock or unlock when it is not allowed to do that.
58 Possible steps to recover: wait until the lock is released
60 #define ROOTPA_ERROR_LOCK 0x00000002
61 #define STRING_ROOTPA_ERROR_LOCK "BUSY_ERROR"
64 Error in one of the CMP commands, see command specific response for more details.
66 #define ROOTPA_ERROR_COMMAND_EXECUTION 0x00000003
67 #define STRING_ROOTPA_ERROR_COMMAND_EXECUTION "COMMAND_EXECUTION_ERROR"
70 Registry returned an error when trying to write a container. mcDaemon could be dead or something seriously wrong in the file system.
71 Possible steps to recover: rebooting the device may help
73 #define ROOTPA_ERROR_REGISTRY 0x00000004
74 #define STRING_ROOTPA_ERROR_REGISTRY "REGISTRY_ERROR"
77 Error in communicating with t-base secure side. This is returned when any of the mcDeamon API calls related to communication with secure side fails.
78 Possible steps to recover: rebooting the device may help
80 #define ROOTPA_ERROR_MOBICORE_CONNECTION 0x00000005
81 #define STRING_ROOTPA_ERROR_MOBICORE_CONNECTION "MOBICORE_CONNECTION_ERROR"
84 Either Nwd or Swd software is out of memory.
85 Possible steps to recover: release memory
87 #define ROOTPA_ERROR_OUT_OF_MEMORY 0x00000006
88 #define STRING_ROOTPA_ERROR_OUT_OF_MEMORY "OUT_OF_MEMORY_ERROR"
91 Rootpa internal error. This error is returned in various situations when something unexpected went wrong e.g. message from CMTL can‘t be interpreted, SE returned an error indicating invalid data, bad request or similar or base64 decoding failed
92 Possible steps to recover: rebooting or updating the device may help
94 #define ROOTPA_ERROR_INTERNAL 0x00000007
95 #define STRING_ROOTPA_ERROR_INTERNAL "INTERNAL_ERROR"
98 Given argument is not allowed (in many cases it is NULL) or e.g. the format of xml is unsupported.
99 Possible steps to recover: give correct argument
101 #define ROOTPA_ERROR_ILLEGAL_ARGUMENT 0x00000008
105 Error in network connection or use of networking library.
106 Possible steps to recover: create working network connection (avoid firewalls and proxies that require password)
108 #define ROOTPA_ERROR_NETWORK 0x00000009
112 Error returned by XML library. Problems in parsing received XML command or creating new XML response.
114 #define ROOTPA_ERROR_XML 0x0000000A
115 #define STRING_ROOTPA_ERROR_XML "XML_ERROR"
118 Registry returned an error when trying to read a container. Most likely the container does not exist.
120 #define ROOTPA_ERROR_REGISTRY_OBJECT_NOT_AVAILABLE 0x0000000B
121 #define STRING_ROOTPA_ERROR_REGISTRY_OBJECT_NOT_AVAILABLE "REGISTRY_OBJECT_NOT_AVAILABLE"
124 CMP version of the device is not supported by SE.
125 Possible steps to recover: use CMP version supported by SE (>=3.0)
127 #define ROOTPA_ERROR_SE_CMP_VERSION 0x0000000C
130 Precoditions for SP container installation are not met in SE.
131 Possible steps to recover: register used SPID to SE
133 #define ROOTPA_ERROR_SE_PRECONDITION_NOT_MET 0x0000000D
136 Requested SP container does not exist. This is not always considered an error but is used as an informative return code. As this is internal return code, user of RootPA services should never see this.
137 Possible steps to recover: add SP container or request container with different SPID
139 #define ROOTPA_ERROR_INTERNAL_NO_CONTAINER 0x00000030
141 #endif // ROOTPAERRORS_H