RFR: 8258915: Temporary buffer cleanup [v8]

Valerie Peng valeriep at openjdk.java.net
Thu Feb 18 05:06:44 UTC 2021


On Sat, 6 Feb 2021 14:40:04 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Clean up temporary byte array, char array, and keyspec around keys and passwords.
>> 
>> No new regression test.
>
> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   materials

src/java.base/share/classes/com/sun/crypto/provider/TlsKeyMaterialGenerator.java line 97:

> 95:         } finally {
> 96:             Arrays.fill(masterSecret, (byte)0);
> 97:         }

It seems that for other Tls* classes, the Arrays.fill(...) call is still inside each method instead of being moved up a level. Just curious why this is done differently?

-------------

PR: https://git.openjdk.java.net/jdk/pull/2070



More information about the security-dev mailing list