8308474: DSA does not reset SecureRandom when initSign is called again

Reviewed-by: weijun
This commit is contained in:
Ben Perez 2023-06-13 16:34:58 +00:00 committed by Weijun Wang
parent 3eec179c72
commit bed9161c81
2 changed files with 70 additions and 1 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -158,6 +158,7 @@ abstract class DSA extends SignatureSpi {
checkKey(params, md.getDigestLength()*8, md.getAlgorithm());
}
this.signingRandom = null;
this.params = params;
this.presetX = priv.getX();
this.presetY = null;