SDK: Fix software update download (#1639)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -34,5 +34,5 @@ public class Tenant {
|
|||||||
@Nullable
|
@Nullable
|
||||||
private String gatewayToken;
|
private String gatewayToken;
|
||||||
|
|
||||||
private boolean downloadAuthenticationEnabled;
|
private boolean downloadAuthenticationEnabled = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import org.eclipse.hawkbit.sdk.Tenant;
|
|||||||
import org.eclipse.hawkbit.sdk.device.DdiController;
|
import org.eclipse.hawkbit.sdk.device.DdiController;
|
||||||
import org.springframework.util.ObjectUtils;
|
import org.springframework.util.ObjectUtils;
|
||||||
|
|
||||||
|
import java.security.SecureRandom;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -112,7 +113,7 @@ public class SetupHelper {
|
|||||||
return securityTargetToken;
|
return securityTargetToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Random RND = new Random();
|
private static final Random RND = new SecureRandom();
|
||||||
public static String randomToken() {
|
public static String randomToken() {
|
||||||
final byte[] rnd = new byte[24];
|
final byte[] rnd = new byte[24];
|
||||||
RND.nextBytes(rnd);
|
RND.nextBytes(rnd);
|
||||||
|
|||||||
Reference in New Issue
Block a user