Skip to content

Commit

Permalink
Do not specify random provider.
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-signal authored and greyson-signal committed Jan 24, 2020
1 parent 0675715 commit 711d22a
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public SendMessageResponse send(OutgoingPushMessageList list, Optional<Unidentif
}

WebSocketRequestMessage requestMessage = WebSocketRequestMessage.newBuilder()
.setId(SecureRandom.getInstance("SHA1PRNG").nextLong())
.setId(new SecureRandom().nextLong())
.setVerb("PUT")
.setPath(String.format("/v1/messages/%s", list.getDestination()))
.addAllHeaders(headers)
Expand All @@ -144,8 +144,6 @@ public SendMessageResponse send(OutgoingPushMessageList list, Optional<Unidentif

if (Util.isEmpty(response.second())) return new SendMessageResponse(false);
else return JsonUtil.fromJson(response.second(), SendMessageResponse.class);
} catch (NoSuchAlgorithmException e) {
throw new AssertionError(e);
} catch (InterruptedException | ExecutionException | TimeoutException e) {
throw new IOException(e);
}
Expand All @@ -160,7 +158,7 @@ public SignalServiceProfile getProfile(SignalServiceAddress address, Optional<Un
}

WebSocketRequestMessage requestMessage = WebSocketRequestMessage.newBuilder()
.setId(SecureRandom.getInstance("SHA1PRNG").nextLong())
.setId(new SecureRandom().nextLong())
.setVerb("GET")
.setPath(String.format("/v1/profile/%s", address.getIdentifier()))
.addAllHeaders(headers)
Expand All @@ -173,8 +171,6 @@ public SignalServiceProfile getProfile(SignalServiceAddress address, Optional<Un
}

return JsonUtil.fromJson(response.second(), SignalServiceProfile.class);
} catch (NoSuchAlgorithmException nsae) {
throw new AssertionError(nsae);
} catch (InterruptedException | ExecutionException | TimeoutException e) {
throw new IOException(e);
}
Expand Down

0 comments on commit 711d22a

Please sign in to comment.