Skip to content

Commit

Permalink
SDK: Fix software update download (#1639)
Browse files Browse the repository at this point in the history
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
  • Loading branch information
avgustinmm committed Feb 13, 2024
1 parent 3b6570b commit e47d78f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -34,5 +34,5 @@ public class Tenant {
@Nullable
private String gatewayToken;

private boolean downloadAuthenticationEnabled;
private boolean downloadAuthenticationEnabled = true;
}
Expand Up @@ -22,6 +22,7 @@
import org.eclipse.hawkbit.sdk.device.DdiController;
import org.springframework.util.ObjectUtils;

import java.security.SecureRandom;
import java.util.Base64;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -112,7 +113,7 @@ public static String setupTargetToken(
return securityTargetToken;
}

private static final Random RND = new Random();
private static final Random RND = new SecureRandom();
public static String randomToken() {
final byte[] rnd = new byte[24];
RND.nextBytes(rnd);
Expand Down

0 comments on commit e47d78f

Please sign in to comment.