changeset 9707:df04e486c6cc

8138589: Correct limits on unlimited cryptography Reviewed-by: mullan
author igerasim
date Wed, 13 Feb 2019 04:55:28 +0000
parents 665ca9aa6e19
children 3262853a2746
files src/share/classes/com/sun/crypto/provider/PBES2Core.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/crypto/provider/PBES2Core.java	Wed Feb 13 04:31:50 2019 +0000
+++ b/src/share/classes/com/sun/crypto/provider/PBES2Core.java	Wed Feb 13 04:55:28 2019 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, 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
@@ -269,7 +269,7 @@
             passwdChars[i] = (char) (passwdBytes[i] & 0x7f);
 
         PBEKeySpec pbeSpec =
-            new PBEKeySpec(passwdChars, salt, iCount, blkSize * 8);
+            new PBEKeySpec(passwdChars, salt, iCount, keyLength);
             // password char[] was cloned in PBEKeySpec constructor,
             // so we can zero it out here
         java.util.Arrays.fill(passwdChars, ' ');