diff --git a/iot/api-client/manager/src/main/java/com/example/cloud/iot/examples/MqttExample.java b/iot/api-client/manager/src/main/java/com/example/cloud/iot/examples/MqttExample.java index 133de8e01ee..24c741837ef 100644 --- a/iot/api-client/manager/src/main/java/com/example/cloud/iot/examples/MqttExample.java +++ b/iot/api-client/manager/src/main/java/com/example/cloud/iot/examples/MqttExample.java @@ -93,7 +93,7 @@ private static String createJwtEs(String projectId, String privateKeyFile) throw byte[] keyBytes = Files.readAllBytes(Paths.get(privateKeyFile)); PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(keyBytes); - KeyFactory kf = KeyFactory.getInstance("ES256"); + KeyFactory kf = KeyFactory.getInstance("EC"); return jwtBuilder.signWith(SignatureAlgorithm.ES256, kf.generatePrivate(spec)).compact(); }