Mercurial > hg > openjdk > bsd-port > jdk
changeset 8756:3a2a9ad6d2c5
8179101: Improve algorithm constraints implementation
Reviewed-by: mullan, ahgross, rhalade, igerasim
author | igerasim |
---|---|
date | Wed, 26 Apr 2017 19:20:55 -0700 |
parents | 1303ee1ee5b8 |
children | 2e006a4f7b59 |
files | src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java Thu Nov 09 06:17:15 2017 +0000 +++ b/src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java Wed Apr 26 19:20:55 2017 -0700 @@ -710,7 +710,6 @@ private int minSize; // the minimal available key size private int maxSize; // the maximal available key size private int prohibitedSize = -1; // unavailable key sizes - private int size; public KeySizeConstraint(String algo, Operator operator, int length) { algorithm = algo; @@ -768,8 +767,9 @@ return; } throw new CertPathValidatorException( - "Algorithm constraints check failed on keysize limits. " - + algorithm + " " + size + "bit key" + extendedMsg(cp), + "Algorithm constraints check failed on keysize limits. " + + algorithm + " " + KeyUtil.getKeySize(key) + "bit key" + + extendedMsg(cp), null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); } } @@ -796,7 +796,7 @@ return true; } - size = KeyUtil.getKeySize(key); + int size = KeyUtil.getKeySize(key); if (size == 0) { return false; // we don't allow any key of size 0. } else if (size > 0) {