Commit e0ea4b7d authored by Jeremy Rover's avatar Jeremy Rover Committed by Aleksey

[IOT-3245] Update Security OIDs with extra .0

Change-Id: Ib032c9b2b35b2ef3c23bb9a9cedba46e5aacd4da
Signed-off-by: default avatarJeremy Rover <jeremy.rover@intel.com>
Bug: https://jira.iotivity.org/browse/IOT-3245
parent 3afda8f4
...@@ -198,7 +198,7 @@ CertProfileViolations ValidateEndEntityCertProfile(const mbedtls_x509_crt *cert) ...@@ -198,7 +198,7 @@ CertProfileViolations ValidateEndEntityCertProfile(const mbedtls_x509_crt *cert)
{ {
// OCF requirements exist for the following extensions, but w/o mbedTLS support // OCF requirements exist for the following extensions, but w/o mbedTLS support
// * check for certificate policies, if present must be 1.3.6.1.4.1.51414.0.1.1 // * check for certificate policies, if present must be 1.3.6.1.4.1.51414.0.1.2
// * cRL Distribution Points // * cRL Distribution Points
if (NULL == cert) if (NULL == cert)
......
...@@ -107,35 +107,35 @@ static const OCByteString s_ekuAnyOid = { s_ekuAnyOidBytes, sizeof(s_ekuAnyOidBy ...@@ -107,35 +107,35 @@ static const OCByteString s_ekuAnyOid = { s_ekuAnyOidBytes, sizeof(s_ekuAnyOidBy
static const char s_ComplianceExtOid[] = MBEDTLS_OID_ISO_IDENTIFIED_ORG MBEDTLS_OID_ORG_DOD "\x01\x04\x01\x83\x91\x56\x01\x00"; // 1.3.6.1.4.1.51414.1.0 static const char s_ComplianceExtOid[] = MBEDTLS_OID_ISO_IDENTIFIED_ORG MBEDTLS_OID_ORG_DOD "\x01\x04\x01\x83\x91\x56\x01\x00"; // 1.3.6.1.4.1.51414.1.0
static const uint8_t s_ComplianceExtBytes[] = { static const uint8_t s_ComplianceExtBytes[] = {
0x30, 0x81, 0x8C, // compliance extension sequence 0x30, 0x81, 0x94, // compliance extension sequence
0x30, 0x09, // version sequence (9 bytes) 0x30, 0x09, // version sequence (9 bytes)
0x02, 0x01, 0x02, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, // [2, 0, 0] 0x02, 0x01, 0x02, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, // [2, 0, 0]
0x30, 0x64, // security profile sequence (100 bytes) 0x30, 0x6C, // security profile sequence (108 bytes)
0x0C, 0x17, // utf8_string, 23 bytes long, '1.3.6.1.4.1.51414.0.1.0' (baseline) 0x0C, 0x19, // utf8_string, 25 bytes long, '1.3.6.1.4.1.51414.0.0.1.0' (baseline)
0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E, 0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E,
0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x31, 0x2E, 0x30,
0x0C, 0x17, // utf8_string, 23 bytes long, '1.3.6.1.4.1.51414.0.2.0' (black) 0x0C, 0x19, // utf8_string, 25 bytes long, '1.3.6.1.4.1.51414.0.0.2.0' (black)
0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E, 0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E,
0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x32, 0x2E, 0x30, 0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x32, 0x2E, 0x30,
0x0C, 0x17, // utf8_string, 23 bytes long, '1.3.6.1.4.1.51414.0.3.0' (blue) 0x0C, 0x19, // utf8_string, 25 bytes long, '1.3.6.1.4.1.51414.0.0.3.0' (blue)
0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E, 0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E,
0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x33, 0x2E, 0x30, 0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x33, 0x2E, 0x30,
0x0C, 0x17, // utf8_string, 23 bytes long, '1.3.6.1.4.1.51414.0.4.0' (purple) 0x0C, 0x19, // utf8_string, 25 bytes long, '1.3.6.1.4.1.51414.0.0.4.0' (purple)
0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E, 0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E,
0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x34, 0x2E, 0x30, 0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x34, 0x2E, 0x30,
0x0C, 0x0F, // urf8_string 15 bytes long (device name) 0x0C, 0x0F, // urf8_string 15 bytes long (device name)
0x49, 0x6F, 0x54, 0x69, 0x76, 0x69, 0x74, 0x79, 0x20, 0x53, // 'IoTivity Server' 0x49, 0x6F, 0x54, 0x69, 0x76, 0x69, 0x74, 0x79, 0x20, 0x53, // 'IoTivity Server'
0x65, 0x72, 0x76, 0x65, 0x72, 0x65, 0x72, 0x76, 0x65, 0x72,
0x0C, 0x08, // urf8_string 8 bytes long (device manufacturer) 0x0C, 0x08, // urf8_string 8 bytes long (device manufacturer)
0x49, 0x6F, 0x54, 0x69, 0x76, 0x69, 0x74, 0x79 // 'IoTivity' 0x49, 0x6F, 0x54, 0x69, 0x76, 0x69, 0x74, 0x79 // 'IoTivity'
}; };
......
{ {
"sp": { "sp": {
"supportedprofiles": [ "1.3.6.1.4.1.51414.0.2.0", "1.3.6.1.4.1.51414.0.3.0", "1.3.6.1.4.1.51414.0.4.0", "1.3.6.1.4.1.51414.0.1.0" ], "supportedprofiles": [ "1.3.6.1.4.1.51414.0.0.2.0", "1.3.6.1.4.1.51414.0.0.3.0", "1.3.6.1.4.1.51414.0.0.4.0", "1.3.6.1.4.1.51414.0.0.1.0" ],
"currentprofile": "1.3.6.1.4.1.51414.0.1.0", "currentprofile": "1.3.6.1.4.1.51414.0.0.1.0",
"rowneruuid": "00000000-0000-0000-0000-000000000000", "rowneruuid": "00000000-0000-0000-0000-000000000000",
"rt": ["oic.r.sp"], "rt": ["oic.r.sp"],
"if": ["oic.if.baseline"] "if": ["oic.if.baseline"]
......
{ {
"sp": { "sp": {
"supportedprofiles": [ "1.3.6.1.4.1.51414.0.1.0" ], "supportedprofiles": [ "1.3.6.1.4.1.51414.0.0.1.0" ],
"currentprofile": "1.3.6.1.4.1.51414.0.1.0", "currentprofile": "1.3.6.1.4.1.51414.0.0.1.0",
"rowneruuid": "00000000-0000-0000-0000-000000000000", "rowneruuid": "00000000-0000-0000-0000-000000000000",
"rt": ["oic.r.ps"], "rt": ["oic.r.ps"],
"if": ["oic.if.baseline"] "if": ["oic.if.baseline"]
......
...@@ -155,22 +155,22 @@ static FILE* fopen_prvnMng(const char*, const char*); ...@@ -155,22 +155,22 @@ static FILE* fopen_prvnMng(const char*, const char*);
static int waitCallbackRet(void); static int waitCallbackRet(void);
static int selectTwoDiffNum(int*, int*, const int, const char*); static int selectTwoDiffNum(int*, int*, const int, const char*);
char * gSupportedProfilesDefault[] = { "1.3.6.1.4.1.51414.0.1.0" }; char * gSupportedProfilesDefault[] = { "1.3.6.1.4.1.51414.0.0.1.0" };
OicSecSp_t gSpDefault = OicSecSp_t gSpDefault =
{ {
1, // supportedLen 1, // supportedLen
gSupportedProfilesDefault, // supportedProfiles[0] gSupportedProfilesDefault, // supportedProfiles[0]
"1.3.6.1.4.1.51414.0.1.0", // activeProfile "1.3.6.1.4.1.51414.0.0.1.0", // activeProfile
}; };
char * gSupportedProfilesAll[] = { "1.3.6.1.4.1.51414.0.2.0", "1.3.6.1.4.1.51414.0.3.0", "1.3.6.1.4.1.51414.0.4.0", "1.3.6.1.4.1.51414.0.1.0", }; char * gSupportedProfilesAll[] = { "1.3.6.1.4.1.51414.0.0.2.0", "1.3.6.1.4.1.51414.0.0.3.0", "1.3.6.1.4.1.51414.0.0.4.0", "1.3.6.1.4.1.51414.0.0.1.0", };
OicSecSp_t gSpAll = OicSecSp_t gSpAll =
{ {
4, // supportedLen 4, // supportedLen
gSupportedProfilesAll, // supportedProfiles[0] gSupportedProfilesAll, // supportedProfiles[0]
"1.3.6.1.4.1.51414.0.2.0", // activeProfile "1.3.6.1.4.1.51414.0.0.2.0", // activeProfile
}; };
char * gSupportedProfilesInvalid[] = { "1.3.6.1.4.1.51414.0.2.0", "1.3.6.1.4.1.51414.0.3.0", "1.3.6.1.4.1.51414.0.4.0", "1.3.6.1.4.1.51414.0.1.0", }; char * gSupportedProfilesInvalid[] = { "1.3.6.1.4.1.51414.0.0.2.0", "1.3.6.1.4.1.51414.0.0.3.0", "1.3.6.1.4.1.51414.0.0.4.0", "1.3.6.1.4.1.51414.0.0.1.0", };
OicSecSp_t gSpInvalid = OicSecSp_t gSpInvalid =
{ {
4, // supportedLen 4, // supportedLen
......
...@@ -95,35 +95,35 @@ static const unsigned char s_ekuCA[] = { 0x30, 0x18, 0x06, 0x0A, 0x2B, 0x06, 0x0 ...@@ -95,35 +95,35 @@ static const unsigned char s_ekuCA[] = { 0x30, 0x18, 0x06, 0x0A, 0x2B, 0x06, 0x0
static const char s_ComplianceExtOid[] = MBEDTLS_OID_ISO_IDENTIFIED_ORG MBEDTLS_OID_ORG_DOD "\x01\x04\x01\x83\x91\x56\x01\x00"; // 1.3.6.1.4.1.51414.1.0 static const char s_ComplianceExtOid[] = MBEDTLS_OID_ISO_IDENTIFIED_ORG MBEDTLS_OID_ORG_DOD "\x01\x04\x01\x83\x91\x56\x01\x00"; // 1.3.6.1.4.1.51414.1.0
static const uint8_t s_ComplianceExtBytes[] = { static const uint8_t s_ComplianceExtBytes[] = {
0x30, 0x81, 0x8C, // compliance extension sequence 0x30, 0x81, 0x94, // compliance extension sequence
0x30, 0x09, // version sequence (9 bytes) 0x30, 0x09, // version sequence (9 bytes)
0x02, 0x01, 0x02, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, // [2, 0, 0] 0x02, 0x01, 0x02, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, // [2, 0, 0]
0x30, 0x64, // security profile sequence (100 bytes) 0x30, 0x6C, // security profile sequence (108 bytes)
0x0C, 0x17, // utf8_string, 23 bytes long, '1.3.6.1.4.1.51414.0.1.0' (baseline) 0x0C, 0x19, // utf8_string, 25 bytes long, '1.3.6.1.4.1.51414.0.0.1.0' (baseline)
0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E, 0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E,
0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x31, 0x2E, 0x30,
0x0C, 0x17, // utf8_string, 23 bytes long, '1.3.6.1.4.1.51414.0.2.0' (black) 0x0C, 0x19, // utf8_string, 25 bytes long, '1.3.6.1.4.1.51414.0.0.2.0' (black)
0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E, 0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E,
0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x32, 0x2E, 0x30, 0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x32, 0x2E, 0x30,
0x0C, 0x17, // utf8_string, 23 bytes long, '1.3.6.1.4.1.51414.0.3.0' (blue) 0x0C, 0x19, // utf8_string, 25 bytes long, '1.3.6.1.4.1.51414.0.0.3.0' (blue)
0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E, 0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E,
0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x33, 0x2E, 0x30, 0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x33, 0x2E, 0x30,
0x0C, 0x17, // utf8_string, 23 bytes long, '1.3.6.1.4.1.51414.0.4.0' (purple) 0x0C, 0x19, // utf8_string, 25 bytes long, '1.3.6.1.4.1.51414.0.0.4.0' (purple)
0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E, 0x31, 0x2E, 0x33, 0x2E, 0x36, 0x2E, 0x31, 0x2E, 0x34, 0x2E,
0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x34, 0x2E, 0x30, 0x31, 0x2E, 0x35, 0x31, 0x34, 0x31, 0x34, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x34, 0x2E, 0x30,
0x0C, 0x0F, // urf8_string 15 bytes long (device name) 0x0C, 0x0F, // urf8_string 15 bytes long (device name)
0x49, 0x6F, 0x54, 0x69, 0x76, 0x69, 0x74, 0x79, 0x20, 0x53, // 'IoTivity Server' 0x49, 0x6F, 0x54, 0x69, 0x76, 0x69, 0x74, 0x79, 0x20, 0x53, // 'IoTivity Server'
0x65, 0x72, 0x76, 0x65, 0x72, 0x65, 0x72, 0x76, 0x65, 0x72,
0x0C, 0x08, // urf8_string 8 bytes long (device manufacturer) 0x0C, 0x08, // urf8_string 8 bytes long (device manufacturer)
0x49, 0x6F, 0x54, 0x69, 0x76, 0x69, 0x74, 0x79 // 'IoTivity' 0x49, 0x6F, 0x54, 0x69, 0x76, 0x69, 0x74, 0x79 // 'IoTivity'
}; };
......
...@@ -44,14 +44,14 @@ static OCResourceHandle gSpHandle = NULL; ...@@ -44,14 +44,14 @@ static OCResourceHandle gSpHandle = NULL;
static OicSecSp_t *gSp = NULL; static OicSecSp_t *gSp = NULL;
// Default sp values // Default sp values
// char * gSupportedProfiles[] = { "1.3.6.1.4.1.51414.0.1.0", "1.3.6.1.4.1.51414.0.2.0", "1.3.6.1.4.1.51414.0.3.0", "1.3.6.1.4.1.51414.0.4.0" }; // char * gSupportedProfiles[] = { "1.3.6.1.4.1.51414.0.0.1.0", "1.3.6.1.4.1.51414.0.0.2.0", "1.3.6.1.4.1.51414.0.0.3.0", "1.3.6.1.4.1.51414.0.0.4.0" };
char * gSupportedProfiles[] = { "1.3.6.1.4.1.51414.0.1.0" }; char * gSupportedProfiles[] = { "1.3.6.1.4.1.51414.0.0.1.0" };
OicSecSp_t gDefaultSp = OicSecSp_t gDefaultSp =
{ {
// 4, // supportedLen // 4, // supportedLen
1, 1,
gSupportedProfiles, // supportedProfiles gSupportedProfiles, // supportedProfiles
"1.3.6.1.4.1.51414.0.1.0", // currentProfile "1.3.6.1.4.1.51414.0.0.1.0", // currentProfile
}; };
bool gAllProps[SP_PROPERTY_COUNT] = { true, true }; bool gAllProps[SP_PROPERTY_COUNT] = { true, true };
......
...@@ -40,10 +40,10 @@ static void TestInit(OicSecSp_t* testSp, bool* spProps); ...@@ -40,10 +40,10 @@ static void TestInit(OicSecSp_t* testSp, bool* spProps);
// Test data // Test data
//***************************************************************************** //*****************************************************************************
static char s_spBlackName[] = "1.3.6.1.4.1.51414.0.2.0"; static char s_spBlackName[] = "1.3.6.1.4.1.51414.0.0.2.0";
static char s_spBlueName[] = "1.3.6.1.4.1.51414.0.3.0"; static char s_spBlueName[] = "1.3.6.1.4.1.51414.0.0.3.0";
static char s_spPurpleName[] = "1.3.6.1.4.1.51414.0.4.0"; static char s_spPurpleName[] = "1.3.6.1.4.1.51414.0.0.4.0";
static char s_spBaselineName[] = "1.3.6.1.4.1.51414.0.1.0"; static char s_spBaselineName[] = "1.3.6.1.4.1.51414.0.0.1.0";
static char* s_profileArray[] = { NULL, NULL, NULL, NULL, NULL, }; static char* s_profileArray[] = { NULL, NULL, NULL, NULL, NULL, };
static OicSecSp_t s_testSp = static OicSecSp_t s_testSp =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment