Skip to content

Conversation

armanbilge
Copy link
Member

The Java SecureRandom blocks. The JS SecureRandom was first shimmed in http4s-crypto, then in CE.

CE's Random.javaSecuritySecureRandom doesn't solve the blocking problem yet, but hopefully it will soon. In any case, this change lets us iterate in CE and reap the benefits everywhere.

@mergify mergify bot added series/0.23 PRs targeting 0.23.x module:server labels Apr 6, 2022
Copy link
Member

@danicheg danicheg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely, despite my safely skippable nitpick.

CachedRandom.nextBytes(bytes)
encodeHexString(bytes)
}
private[middleware] def genTokenString: SyncIO[String] =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, can we move to F[_]: Sync instead of SyncIO? It seems genTokenString is used only when Sync is in-game.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes I think so :) let's do that 👍

@armanbilge
Copy link
Member Author

The JS builds are getting flaky because of the artifact size test I added :(

@armanbilge armanbilge merged commit cc2bb50 into http4s:series/0.23 Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:server series/0.23 PRs targeting 0.23.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants