1 //******************************************************************
3 // Copyright 2015 Intel Mobile Communications GmbH All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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
11 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
22 #include "securevirtualresourcetypes.h"
25 const char * SVR_DB_FILE_NAME = "oic_svr_db.json";
26 const char * SVR_DB_DAT_FILE_NAME = "oic_svr_db.dat";
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";
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";
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";
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";
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";
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";
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";
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";
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";
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";
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";
86 const char * OIC_JSON_SUBJECT_NAME = "subject";
87 const char * OIC_JSON_RESOURCES_NAME = "resources";
88 const char * OIC_JSON_AMSS_NAME = "amss";
89 const char * OIC_JSON_AMS_NAME = "ams";
90 const char * OIC_JSON_PERMISSION_NAME = "permission";
91 const char * OIC_JSON_OWNERS_NAME = "ownrs";
92 const char * OIC_JSON_OWNER_NAME = "ownr";
93 const char * OIC_JSON_DEVOWNERID_NAME = "devowneruuid";
94 const char * OIC_JSON_OWNED_NAME = "owned";
95 const char * OIC_JSON_OXM_NAME = "oxm";
96 const char * OIC_JSON_OXMS_NAME = "oxms";
97 const char * OIC_JSON_OXM_TYPE_NAME = "oxmtype";
98 const char * OIC_JSON_OXM_SEL_NAME = "oxmsel";
99 const char * OIC_JSON_DEVICE_ID_FORMAT_NAME = "didformat";
100 const char * OIC_JSON_ISOP_NAME = "isop";
101 const char * OIC_JSON_COMMIT_HASH_NAME = "ch";
102 const char * OIC_JSON_DEVICE_ID_NAME = "deviceuuid";
103 const char * OIC_JSON_CM_NAME = "cm";
104 const char * OIC_JSON_TM_NAME = "tm";
105 const char * OIC_JSON_OM_NAME = "om";
106 const char * OIC_JSON_SM_NAME = "sm";
107 const char * OIC_JSON_CREDID_NAME = "credid";
108 const char * OIC_JSON_SUBJECTID_NAME = "subjectuuid";
109 const char * OIC_JSON_ROLEIDS_NAME = "roleid";
110 const char * OIC_JSON_CREDTYPE_NAME = "credtype";
111 const char * OIC_JSON_PUBLICDATA_NAME = "publicdata";
112 const char * OIC_JSON_PRIVATEDATA_NAME = "privatedata";
113 const char * OIC_JSON_PUBDATA_NAME = "pubdata";
114 const char * OIC_JSON_PRIVDATA_NAME = "privdata";
115 const char * OIC_JSON_OPTDATA_NAME = "optdata";
116 const char * OIC_JSON_SERVICE_DEVICE_ID = "svcdid";
117 const char * OIC_JSON_SERVICE_TYPE = "svct";
118 const char* OIC_JSON_VALIDITY_NAME = "validity";
119 const char * OIC_JSON_PERIOD_NAME = "period";
120 const char * OIC_JSON_PERIODS_NAME = "prds";
121 const char * OIC_JSON_CRMS_NAME = "crms";
122 const char * OIC_JSON_RECURRENCES_NAME = "recurrence";
123 const char * OIC_JSON_SUPPORTED_CRED_TYPE_NAME = "sct";
124 const char * OIC_JSON_DPC_NAME = "dpc";
125 const char * OIC_JSON_EDP_NAME = "edp";
126 const char * OIC_JSON_PIN_NAME = "pin";
127 const char * OIC_JSON_PDACL_NAME = "pdacl";
128 const char * OIC_JSON_PDDEV_LIST_NAME = "pddev";
129 const char * OIC_JSON_ROWNER_NAME = "rowner";
130 const char * OIC_JSON_PRM_NAME = "prm";
131 const char * OIC_JSON_SPM_NAME = "spm";
132 const char * OIC_JSON_PDEVICE_ID_NAME = "pdeviceuuid";
133 const char * OIC_JSON_RLIST_NAME = "rlist";
134 const char * OIC_JSON_HREF_NAME = OC_RSRVD_HREF;
135 const char * OIC_JSON_REL_NAME = OC_RSRVD_REL;
136 const char * OIC_JSON_RT_NAME = OC_RSRVD_RESOURCE_TYPE;
137 const char * OIC_JSON_IF_NAME = OC_RSRVD_INTERFACE;
138 const char * OIC_JSON_ROWNERID_NAME = "rowneruuid";
139 const char * OIC_JSON_ENCODING_NAME = "encoding";
140 const char * OIC_JSON_DATA_NAME = "data";
141 const char * OIC_JSON_SEC_V_NAME = "secv";
143 const char * OIC_JSON_EMPTY_STRING = "";
145 OicUuid_t WILDCARD_SUBJECT_ID = {"*"};
146 OicUuid_t WILDCARD_SUBJECT_B64_ID = { .id = {'2', '2', '2', '2', '2', '2', '2', '2',
147 '2', '2', '2', '2', '2', '2', '2', '2' }};
148 size_t WILDCARD_SUBJECT_ID_LEN = 1;
149 const char * WILDCARD_RESOURCE_URI = "*";
151 //Ownership Transfer Methods
152 const char * OXM_JUST_WORKS = "oic.sec.doxm.jw";
153 const char * OXM_RANDOM_DEVICE_PIN = "oic.sec.doxm.rdp";
154 const char * OXM_MANUFACTURER_CERTIFICATE = "oic.sec.doxm.mfgcert";
156 //Credential data encoding methods
157 const char * OIC_SEC_ENCODING_BASE64 = "oic.sec.encoding.base64";
158 const char * OIC_SEC_ENCODING_RAW = "oic.sec.encoding.raw";
160 const char * OIC_SEC_TRUE = "true";
161 const char * OIC_SEC_FALSE = "false";
163 const char * OIC_SEC_REST_QUERY_SEPARATOR = ";";
164 char OIC_SEC_REST_QUERY_DELIMETER = '=';
167 const char * DEFAULT_SEC_VERSION = "0.0.0";