Skip to content

Commit 655afa7

Browse files
committedJan 28, 2018
fix Elliptic Curve algorithm name (GoogleCloudPlatform#1010)
1 parent 3784ac3 commit 655afa7

File tree

1 file changed

+1
-1
lines changed
  • iot/api-client/manager/src/main/java/com/example/cloud/iot/examples

1 file changed

+1
-1
lines changed
 

‎iot/api-client/manager/src/main/java/com/example/cloud/iot/examples/MqttExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private static String createJwtEs(String projectId, String privateKeyFile) throw
9393

9494
byte[] keyBytes = Files.readAllBytes(Paths.get(privateKeyFile));
9595
PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(keyBytes);
96-
KeyFactory kf = KeyFactory.getInstance("ES256");
96+
KeyFactory kf = KeyFactory.getInstance("EC");
9797

9898
return jwtBuilder.signWith(SignatureAlgorithm.ES256, kf.generatePrivate(spec)).compact();
9999
}

0 commit comments

Comments
 (0)
Please sign in to comment.