Skip to content

Commit

Permalink
[JENKINS-37302] Give up faster when we are unlucky
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenc authored Aug 10, 2016
1 parent 569959a commit d2a3455
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/jenkinsci/remoting/engine/Jnlp3Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static byte[] keyFromString(String keyString) {
public static String generateChallenge() {
try {
MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
outer: for (int tries = 0; tries < 256; tries++) {
outer: for (int tries = 0; tries < 10; tries++) {
String challenge = new BigInteger(10400, new SecureRandom()).toString(32);

// JENKINS-37302 we need to validate that this is a challenge that can be round-tripped
Expand Down

0 comments on commit d2a3455

Please sign in to comment.