Skip to content

Commit

Permalink
Print hexa public and private key in log of Leshan client demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernard31 committed Aug 17, 2018
1 parent e27d2de commit 62484ed
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,11 @@ public static void createAndStartClient(String endpoint, String localAddress, in
String params = ecPublicKey.getParams().toString();

LOG.info(
"Client public Key is : \n Elliptic Curve parameters : {} \n Public x coord : {} \n Public y coord : {}",
params, Hex.encodeHexString(x), Hex.encodeHexString(y));
"Client uses RPK : \n Elliptic Curve parameters : {} \n Public x coord : {} \n Public y coord : {} \n Public Key (Hex): {} \n Private Key (Hex): {}",
params, Hex.encodeHexString(x), Hex.encodeHexString(y),
Hex.encodeHexString(rawPublicKey.getEncoded()),
Hex.encodeHexString(clientPrivateKey.getEncoded()));

} else {
throw new IllegalStateException("Unsupported Public Key Format (only ECPublicKey supported).");
}
Expand Down

0 comments on commit 62484ed

Please sign in to comment.