Prevent occasional failure of CheckChainTrustedTest
There's one unit test that occasionally fails. This occurs as a result of an unintended collision. As part of the test, many certificates are generated and stored in keystores. The alias used for the entry was based on the hashcode of the public ke of the certificate. The value range of those hashcodes is fairly small (it has only a couple of digits), which leads to occasional collisions, causing the test to fail. This commit replaces the hashcode-based alias with the Base64-encoded public key information. This ensures that aliases for distinct keys are also distinct, while ensuring that the aliases for equal keys are equal.
Showing
Please register or sign in to comment