replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / security / src / srmresourcestrings.c
1 //******************************************************************
2 //
3 // Copyright 2015 Intel Mobile Communications GmbH All Rights Reserved.
4 //
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //      http://www.apache.org/licenses/LICENSE-2.0
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20
21 #include <stdlib.h>
22 #include "securevirtualresourcetypes.h"
23 #include "octypes.h"
24
25 const char * SVR_DB_FILE_NAME = "oic_svr_db.json";
26 const char * SVR_DB_DAT_FILE_NAME = "oic_svr_db.dat";
27
28 //AMACL
29 const char * OIC_RSRC_TYPE_SEC_AMACL = "oic.r.amacl";
30 const char * OIC_RSRC_AMACL_URI =  "/oic/sec/amacl";
31 const char * OIC_JSON_AMACL_NAME = "amacl";
32
33 //ACL
34 const char * OIC_RSRC_TYPE_SEC_ACL = "oic.r.acl";
35 const char * OIC_RSRC_ACL_URI =  "/oic/sec/acl";
36 const char * OIC_JSON_ACL_NAME = "acl";
37 const char * OIC_JSON_ACLIST_NAME = "aclist";
38 const char * OIC_JSON_ACES_NAME = "aces";
39
40 //Pstat
41 const char * OIC_RSRC_TYPE_SEC_PSTAT = "oic.r.pstat";
42 const char * OIC_RSRC_PSTAT_URI =  "/oic/sec/pstat";
43 const char * OIC_JSON_PSTAT_NAME = "pstat";
44
45 //doxm
46 const char * OIC_RSRC_TYPE_SEC_DOXM = "oic.r.doxm";
47 const char * OIC_RSRC_DOXM_URI =  "/oic/sec/doxm";
48 const char * OIC_JSON_DOXM_NAME = "doxm";
49
50 //cred
51 const char * OIC_RSRC_TYPE_SEC_CRED = "oic.r.cred";
52 const char * OIC_RSRC_CRED_URI =  "/oic/sec/cred";
53 const char * OIC_JSON_CRED_NAME = "cred";
54 const char * OIC_JSON_CREDS_NAME = "creds";
55
56 //CRL
57 const char * OIC_RSRC_TYPE_SEC_CRL = "oic.r.crl";
58 const char * OIC_RSRC_CRL_URI =  "/oic/sec/crl";
59 const char * OIC_JSON_CRL_NAME = "crl";
60
61 //SACL
62 const char * OIC_RSRC_TYPE_SEC_SACL = "oic.r.sacl";
63 const char * OIC_RSRC_SACL_URI =  "/oic/sec/sacl";
64 const char * OIC_JSON_SACL_NAME = "sacl";
65
66 //pconf
67 const char * OIC_RSRC_TYPE_SEC_PCONF = "oic.r.pconf";
68 const char * OIC_RSRC_PCONF_URI =  "/oic/sec/pconf";
69 const char * OIC_JSON_PCONF_NAME = "pconf";
70
71 //dpairing
72 const char * OIC_RSRC_TYPE_SEC_DPAIRING = "oic.r.dpairing";
73 const char * OIC_RSRC_DPAIRING_URI =  "/oic/sec/dpairing";
74 const char * OIC_JSON_DPAIRING_NAME = "dpairing";
75
76 //version
77 const char * OIC_RSRC_TYPE_SEC_VER = "oic.r.ver";
78 const char * OIC_RSRC_VER_URI =  "/oic/sec/ver";
79 const char * OIC_JSON_VER_NAME = "ver";
80
81 //reset profile
82 const char * OIC_JSON_RESET_PF_NAME = "resetpf";
83
84 const char * OIC_JSON_SUBJECT_NAME = "subject";
85 const char * OIC_JSON_RESOURCES_NAME = "resources";
86 const char * OIC_JSON_AMSS_NAME = "amss";
87 const char * OIC_JSON_AMS_NAME = "ams";
88 const char * OIC_JSON_PERMISSION_NAME = "permission";
89 const char * OIC_JSON_OWNERS_NAME = "ownrs";
90 const char * OIC_JSON_OWNER_NAME = "ownr";
91 const char * OIC_JSON_DEVOWNERID_NAME = "devowneruuid";
92 #ifdef MULTIPLE_OWNER
93 const char * OIC_JSON_SUBOWNERID_NAME = "x.org.iotivity.subowneruuid";
94 #endif //MULTIPLE_OWNER
95 const char * OIC_JSON_OWNED_NAME = "owned";
96 const char * OIC_JSON_OXM_NAME = "oxm";
97 const char * OIC_JSON_OXMS_NAME = "oxms";
98 #ifdef MULTIPLE_OWNER
99 const char * OIC_JSON_MOM_NAME = "x.org.iotivity.mom";
100 #endif //MULTIPLE_OWNER
101 const char * OIC_JSON_OXM_TYPE_NAME = "oxmtype";
102 const char * OIC_JSON_OXM_SEL_NAME = "oxmsel";
103 const char * OIC_JSON_DEVICE_ID_FORMAT_NAME = "didformat";
104 const char * OIC_JSON_ISOP_NAME = "isop";
105 const char * OIC_JSON_COMMIT_HASH_NAME = "ch";
106 const char * OIC_JSON_DEVICE_ID_NAME = "deviceuuid";
107 const char * OIC_JSON_CM_NAME = "cm";
108 const char * OIC_JSON_TM_NAME = "tm";
109 const char * OIC_JSON_OM_NAME = "om";
110 const char * OIC_JSON_SM_NAME = "sm";
111 const char * OIC_JSON_CREDID_NAME = "credid";
112 const char * OIC_JSON_SUBJECTID_NAME = "subjectuuid";
113 const char * OIC_JSON_ROLEIDS_NAME = "roleid";
114 const char * OIC_JSON_CREDTYPE_NAME = "credtype";
115 const char * OIC_JSON_PUBLICDATA_NAME = "publicdata";
116 const char * OIC_JSON_PRIVATEDATA_NAME = "privatedata";
117 const char * OIC_JSON_PUBDATA_NAME = "pubdata";
118 const char * OIC_JSON_PRIVDATA_NAME = "privdata";
119 const char * OIC_JSON_OPTDATA_NAME = "optionaldata";
120 const char * OIC_JSON_CREDUSAGE_NAME = "credusage";
121 const char * OIC_JSON_REVOCATION_STATUS_NAME = "revstat";
122 const char* OIC_JSON_VALIDITY_NAME = "validity";
123 const char * OIC_JSON_PERIOD_NAME = "period";
124 const char * OIC_JSON_PERIODS_NAME = "prds";
125 const char * OIC_JSON_CRMS_NAME = "crms";
126 const char * OIC_JSON_RECURRENCES_NAME = "recurrence";
127 const char * OIC_JSON_SUPPORTED_CRED_TYPE_NAME = "sct";
128 const char * OIC_JSON_DPC_NAME = "dpc";
129 const char * OIC_JSON_EDP_NAME = "edp";
130 const char * OIC_JSON_PIN_NAME = "pin";
131 const char * OIC_JSON_PDACL_NAME = "pdacl";
132 const char * OIC_JSON_PDDEV_LIST_NAME = "pddev";
133 const char * OIC_JSON_ROWNER_NAME = "rowner";
134 const char * OIC_JSON_PRM_NAME = "prm";
135 const char * OIC_JSON_SPM_NAME = "spm";
136 const char * OIC_JSON_PDEVICE_ID_NAME = "pdeviceuuid";
137 const char * OIC_JSON_RLIST_NAME = "rlist";
138 const char * OIC_JSON_HREF_NAME = OC_RSRVD_HREF;
139 const char * OIC_JSON_REL_NAME = OC_RSRVD_REL;
140 const char * OIC_JSON_RT_NAME = OC_RSRVD_RESOURCE_TYPE;
141 const char * OIC_JSON_IF_NAME = OC_RSRVD_INTERFACE;
142 const char * OIC_JSON_ROWNERID_NAME = "rowneruuid";
143 #ifdef MULTIPLE_OWNER
144 const char * OIC_JSON_EOWNERID_NAME = "x.org.iotivity.eowneruuid";
145 #endif //MULTIPLE_OWNER
146 const char * OIC_JSON_ENCODING_NAME = "encoding";
147 const char * OIC_JSON_DATA_NAME = "data";
148 const char * OIC_JSON_SEC_V_NAME = "secv";
149
150 const char * OIC_JSON_EMPTY_STRING = "";
151
152 // Certificates provided by Cloud
153 const char * TRUST_CA = "trust_ca";
154 const char * PRIMARY_CERT = "primary_cert";
155
156 // Certificates provided by manufacturer
157 const char * MF_TRUST_CA = "mfg_trust_ca";
158 const char * MF_PRIMARY_CERT = "mfg_primary_cert";
159
160 OicUuid_t WILDCARD_SUBJECT_ID = {"*"};
161 OicUuid_t WILDCARD_SUBJECT_B64_ID = { .id = {'2', '2', '2', '2', '2', '2', '2', '2',
162                                              '2', '2', '2', '2', '2', '2', '2', '2' }};
163 size_t WILDCARD_SUBJECT_ID_LEN = 1;
164 const char * WILDCARD_RESOURCE_URI = "*";
165
166 //Ownership Transfer Methods
167 const char * OXM_JUST_WORKS = "oic.sec.doxm.jw";
168 const char * OXM_RANDOM_DEVICE_PIN = "oic.sec.doxm.rdp";
169 const char * OXM_MANUFACTURER_CERTIFICATE = "oic.sec.doxm.mfgcert";
170 #ifdef MULTIPLE_OWNER
171 const char * OXM_PRECONF_PIN = "x.org.iotivity.sec.doxm.pcp";
172 #endif //MULTIPLE_OWNER
173 const char * OXM_MV_JUST_WORKS = "x.org.iotivity.sec.doxm.mvjw";
174 const char * OXM_CON_MFG_CERT = "x.org.iotivity.conmfgcert";
175
176 //Mutual Verified Just-Works Message Prefix
177 const char * MUTUAL_VERIF_NUM = "mutualVerifNum";
178
179 //Credential data encoding methods
180 const char * OIC_SEC_ENCODING_BASE64 = "oic.sec.encoding.base64";
181 const char * OIC_SEC_ENCODING_RAW = "oic.sec.encoding.raw";
182 const char * OIC_SEC_ENCODING_PEM = "oic.sec.encoding.pem";
183 const char * OIC_SEC_ENCODING_DER = "oic.sec.encoding.der";
184
185 const char * OIC_SEC_TRUE = "true";
186 const char * OIC_SEC_FALSE = "false";
187
188 const char * OIC_SEC_REST_QUERY_SEPARATOR = ";";
189 char OIC_SEC_REST_QUERY_DELIMETER = '=';
190
191 //Security Version
192 const char * DEFAULT_SEC_VERSION = "0.0.0";
193