Commit 616f3316 authored by Kishen Maloor's avatar Kishen Maloor

Pick PSK ciphersuite priority for OC connections

Change-Id: I04b937c3ac6918c1e1b996701e47c05b0d7ab58c
Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
parent 82502811
......@@ -227,6 +227,7 @@ obt_cert_11(oc_client_response_t *data)
oc_device_t *device = o->device;
oc_endpoint_t *ep = oc_obt_get_secure_endpoint(device->endpoint);
oc_tls_close_connection(ep);
oc_tls_select_psk_ciphersuite();
if (oc_init_post("/oic/sec/pstat", ep, NULL, &obt_cert_12, HIGH_QOS, o)) {
oc_rep_start_root_object();
oc_rep_set_object(root, dos);
......@@ -465,9 +466,9 @@ obt_cert_5(oc_client_response_t *data)
goto err_obt_cert_5;
}
/** 5) generate random deviceuuid; <store new peer uuid>; post doxm deviceuuid (CR2935)
/** 5) generate random deviceuuid; <store new peer uuid>; post doxm deviceuuid
*/
oc_uuid_t dev_uuid;
oc_uuid_t dev_uuid = { 0 };
oc_gen_uuid(&dev_uuid);
char uuid[OC_UUID_LEN];
oc_uuid_to_str(&dev_uuid, uuid, OC_UUID_LEN);
......@@ -604,7 +605,7 @@ err_obt_cert_2:
2) post doxm oxmsel=2
3) <Open-TLS_ECDSA_with_Mfg_Cert>+post pstat om=4
4) post doxm devowneruuid
5) generate random deviceuuid; <store new peer uuid>; post doxm deviceuuid (CR2935)
5) generate random deviceuuid; <store new peer uuid>; post doxm deviceuuid
6) post doxm rowneruuid
7) post acl rowneruuid
8) post pstat rowneruuid
......
......@@ -226,6 +226,7 @@ obt_jw_11(oc_client_response_t *data)
oc_device_t *device = o->device;
oc_endpoint_t *ep = oc_obt_get_secure_endpoint(device->endpoint);
oc_tls_close_connection(ep);
oc_tls_select_psk_ciphersuite();
if (oc_init_post("/oic/sec/pstat", ep, NULL, &obt_jw_12, HIGH_QOS, o)) {
oc_rep_start_root_object();
oc_rep_set_object(root, dos);
......@@ -464,9 +465,9 @@ obt_jw_5(oc_client_response_t *data)
goto err_obt_jw_5;
}
/** 5) generate random deviceuuid; <store new peer uuid>; post doxm deviceuuid (CR2935)
/** 5) generate random deviceuuid; <store new peer uuid>; post doxm deviceuuid
*/
oc_uuid_t dev_uuid;
oc_uuid_t dev_uuid = { 0 };
oc_gen_uuid(&dev_uuid);
char uuid[OC_UUID_LEN];
oc_uuid_to_str(&dev_uuid, uuid, OC_UUID_LEN);
......@@ -603,7 +604,7 @@ err_obt_jw_2:
2) post doxm oxmsel=0
3) <Open-anon-ecdh>+post pstat om=4
4) post doxm devowneruuid
5) generate random deviceuuid; <store new peer uuid>; post doxm deviceuuid (CR2935)
5) generate random deviceuuid; <store new peer uuid>; post doxm deviceuuid
6) post doxm rowneruuid
7) post acl rowneruuid
8) post pstat rowneruuid
......
......@@ -227,6 +227,7 @@ obt_rdp_10(oc_client_response_t *data)
oc_device_t *device = o->device;
oc_endpoint_t *ep = oc_obt_get_secure_endpoint(device->endpoint);
oc_tls_close_connection(ep);
oc_tls_select_psk_ciphersuite();
if (oc_init_post("/oic/sec/pstat", ep, NULL, &obt_rdp_11, HIGH_QOS, o)) {
oc_rep_start_root_object();
oc_rep_set_object(root, dos);
......@@ -465,16 +466,16 @@ obt_rdp_4(oc_client_response_t *data)
goto err_obt_rdp_4;
}
/** 4) generate random deviceuuid; <store new peer uuid>; post doxm deviceuuid (CR2935)
/** 4) generate random deviceuuid; <store new peer uuid>; post doxm deviceuuid
*/
oc_uuid_t dev_uuid;
oc_uuid_t dev_uuid = { 0 };
oc_gen_uuid(&dev_uuid);
char uuid[OC_UUID_LEN];
oc_uuid_to_str(&dev_uuid, uuid, OC_UUID_LEN);
OC_DBG("generated deviceuuid: %s", uuid);
oc_device_t *device = o->device;
/* Free temporary PSK credential that was created for this handshake
/* Free temporary PSK credential that was created for this handshake
* and has served its purpose.
*/
char suuid[37];
......@@ -580,7 +581,7 @@ err_obt_rdp_2:
1) provision PSK cred locally+<Open-TLS-PSK>+get /oic/d
2) post pstat om=4
3) post doxm devowneruuid
4) generate random deviceuuid; <store new peer uuid>; post doxm deviceuuid (CR2935)
4) generate random deviceuuid; <store new peer uuid>; post doxm deviceuuid
5) post doxm rowneruuid
6) post acl rowneruuid
7) post pstat rowneruuid
......
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