Switch from using Random to SecureRandom.
Our security team's code scanner flagged an issue where we use Random in Header.java when we should be using SecureRandom.
This project already uses SecureRandom in other places in the code, UDPClient.java.
There is some additional discussion on SecureRandom vs. Random here: https://stackoverflow.com/questions/11051205/difference-between-java-util-random-and-java-security-securerandom
There is a lot of hugely complicated code in UDPClient to deal with Windows systems where getting randomness with SecureRandom triggers DNS resolutions, causing lockups if dnsjava is used to replace the system resolver. All of this logic would need to be duplicated and/or refactored to make the same change in the Header class.
Last edit: Brian Wellington 2017-02-08
Ticket moved from /p/dnsjava/patches/35/
https://github.com/dnsjava/dnsjava/issues/24