Skip to content

Commit

Permalink
Set client name as client OSCORE Sender ID
Browse files Browse the repository at this point in the history
Signed-off-by: Rikard Höglund <rikard.hoglund@ri.se>
  • Loading branch information
rikard-sics committed Sep 18, 2019
1 parent 3a4e777 commit 401db2b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ public static void createAndStartClient(String endpoint, String localAddress, in
clientPrivateKey.getEncoded(), serverCertificate.getEncoded()));
initializer.setInstancesForObject(SERVER, new Server(123, 30, BindingMode.U, false));
} else if (useOSCore) {
Oscore oscoreObject = new Oscore(12345, "11223344", "AA", "BB"); //Hardcoded values
String clientName = Hex.encodeHexString(endpoint.getBytes());
Oscore oscoreObject = new Oscore(12345, "11223344", clientName, "BB"); //Partially hardcoded values
initializer.setInstancesForObject(SECURITY, oscoreOnly(serverURI, 123, oscoreObject.getId()));
initializer.setInstancesForObject(OSCORE, oscoreObject);
initializer.setInstancesForObject(SERVER, new Server(123, 30, BindingMode.U, false));
Expand Down

0 comments on commit 401db2b

Please sign in to comment.