Merge branch 'master' into extended-easysetup
[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 //svc
67 const char * OIC_RSRC_TYPE_SEC_SVC = "oic.r.svc";
68 const char * OIC_RSRC_SVC_URI =  "/oic/sec/svc";
69 const char * OIC_JSON_SVC_NAME = "svc";
70
71 //pconf
72 const char * OIC_RSRC_TYPE_SEC_PCONF = "oic.r.pconf";
73 const char * OIC_RSRC_PCONF_URI =  "/oic/sec/pconf";
74 const char * OIC_JSON_PCONF_NAME = "pconf";
75
76 //dpairing
77 const char * OIC_RSRC_TYPE_SEC_DPAIRING = "oic.r.dpairing";
78 const char * OIC_RSRC_DPAIRING_URI =  "/oic/sec/dpairing";
79 const char * OIC_JSON_DPAIRING_NAME = "dpairing";
80
81 //version
82 const char * OIC_RSRC_TYPE_SEC_VER = "oic.r.ver";
83 const char * OIC_RSRC_VER_URI =  "/oic/sec/ver";
84 const char * OIC_JSON_VER_NAME = "ver";
85
86 //reset profile
87 const char * OIC_JSON_RESET_PF_NAME = "resetpf";
88
89 const char * OIC_JSON_SUBJECT_NAME = "subject";
90 const char * OIC_JSON_RESOURCES_NAME = "resources";
91 const char * OIC_JSON_AMSS_NAME = "amss";
92 const char * OIC_JSON_AMS_NAME = "ams";
93 const char * OIC_JSON_PERMISSION_NAME = "permission";
94 const char * OIC_JSON_OWNERS_NAME = "ownrs";
95 const char * OIC_JSON_OWNER_NAME = "ownr";
96 const char * OIC_JSON_DEVOWNERID_NAME = "devowneruuid";
97 const char * OIC_JSON_OWNED_NAME = "owned";
98 const char * OIC_JSON_OXM_NAME = "oxm";
99 const char * OIC_JSON_OXMS_NAME = "oxms";
100 const char * OIC_JSON_OXM_TYPE_NAME = "oxmtype";
101 const char * OIC_JSON_OXM_SEL_NAME = "oxmsel";
102 const char * OIC_JSON_DEVICE_ID_FORMAT_NAME = "didformat";
103 const char * OIC_JSON_ISOP_NAME = "isop";
104 const char * OIC_JSON_COMMIT_HASH_NAME = "ch";
105 const char * OIC_JSON_DEVICE_ID_NAME = "deviceuuid";
106 const char * OIC_JSON_CM_NAME = "cm";
107 const char * OIC_JSON_TM_NAME = "tm";
108 const char * OIC_JSON_OM_NAME = "om";
109 const char * OIC_JSON_SM_NAME = "sm";
110 const char * OIC_JSON_CREDID_NAME = "credid";
111 const char * OIC_JSON_SUBJECTID_NAME = "subjectuuid";
112 const char * OIC_JSON_ROLEIDS_NAME = "roleid";
113 const char * OIC_JSON_CREDTYPE_NAME = "credtype";
114 const char * OIC_JSON_PUBLICDATA_NAME = "publicdata";
115 const char * OIC_JSON_PRIVATEDATA_NAME = "privatedata";
116 const char * OIC_JSON_PUBDATA_NAME = "pubdata";
117 const char * OIC_JSON_PRIVDATA_NAME = "privdata";
118 const char * OIC_JSON_OPTDATA_NAME = "optdata";
119 const char * OIC_JSON_SERVICE_DEVICE_ID = "svcdid";
120 const char * OIC_JSON_SERVICE_TYPE = "svct";
121 const char* OIC_JSON_VALIDITY_NAME = "validity";
122 const char * OIC_JSON_PERIOD_NAME = "period";
123 const char * OIC_JSON_PERIODS_NAME = "prds";
124 const char * OIC_JSON_CRMS_NAME = "crms";
125 const char * OIC_JSON_RECURRENCES_NAME = "recurrence";
126 const char * OIC_JSON_SUPPORTED_CRED_TYPE_NAME = "sct";
127 const char * OIC_JSON_DPC_NAME = "x.com.samsung.dpc";
128 const char * OIC_JSON_EDP_NAME = "edp";
129 const char * OIC_JSON_PIN_NAME = "pin";
130 const char * OIC_JSON_PDACL_NAME = "pdacl";
131 const char * OIC_JSON_PDDEV_LIST_NAME = "pddev";
132 const char * OIC_JSON_ROWNER_NAME = "rowner";
133 const char * OIC_JSON_PRM_NAME = "prm";
134 const char * OIC_JSON_SPM_NAME = "spm";
135 const char * OIC_JSON_PDEVICE_ID_NAME = "pdeviceuuid";
136 const char * OIC_JSON_RLIST_NAME = "rlist";
137 const char * OIC_JSON_HREF_NAME = OC_RSRVD_HREF;
138 const char * OIC_JSON_REL_NAME = OC_RSRVD_REL;
139 const char * OIC_JSON_RT_NAME = OC_RSRVD_RESOURCE_TYPE;
140 const char * OIC_JSON_IF_NAME = OC_RSRVD_INTERFACE;
141 const char * OIC_JSON_ROWNERID_NAME = "rowneruuid";
142 const char * OIC_JSON_ENCODING_NAME = "encoding";
143 const char * OIC_JSON_DATA_NAME = "data";
144 const char * OIC_JSON_SEC_V_NAME = "secv";
145
146 const char * OIC_JSON_EMPTY_STRING = "";
147
148 OicUuid_t WILDCARD_SUBJECT_ID = {"*"};
149 OicUuid_t WILDCARD_SUBJECT_B64_ID = { .id = {'2', '2', '2', '2', '2', '2', '2', '2',
150                                              '2', '2', '2', '2', '2', '2', '2', '2' }};
151 size_t WILDCARD_SUBJECT_ID_LEN = 1;
152 const char * WILDCARD_RESOURCE_URI = "*";
153
154 //Ownership Transfer Methods
155 const char * OXM_JUST_WORKS = "oic.sec.doxm.jw";
156 const char * OXM_RANDOM_DEVICE_PIN = "oic.sec.doxm.rdp";
157 const char * OXM_MANUFACTURER_CERTIFICATE = "oic.sec.doxm.mfgcert";
158
159 //Credential data encoding methods
160 const char * OIC_SEC_ENCODING_BASE64 = "oic.sec.encoding.base64";
161 const char * OIC_SEC_ENCODING_RAW = "oic.sec.encoding.raw";
162
163 const char * OIC_SEC_TRUE = "true";
164 const char * OIC_SEC_FALSE = "false";
165
166 const char * OIC_SEC_REST_QUERY_SEPARATOR = ";";
167 char OIC_SEC_REST_QUERY_DELIMETER = '=';
168
169 //Security Version
170 const char * DEFAULT_SEC_VERSION = "0.0.0";
171