Skip to content

Commit 96af485

Browse files
committed
JCE: use local KDF iterations in WKSPrivateKey.getDecryptedKey() in case Security property iteration count has changed
1 parent 436c687 commit 96af485

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/wolfssl/provider/jce/WolfSSLKeyStore.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,6 +1657,7 @@ public synchronized void engineLoad(InputStream stream, char[] password)
16571657
}
16581658

16591659
if (stream == null) {
1660+
log("KeyStore InputStream is null, nothing to load");
16601661
return;
16611662
}
16621663

@@ -2230,7 +2231,7 @@ protected synchronized byte[] getDecryptedKey(char[] password)
22302231
* split between 32-byte AES-CBC-256 key and 64-byte
22312232
* HMAC-SHA512 key. */
22322233
derivedKey = deriveKeyFromPassword(password, this.kdfSalt,
2233-
WKS_PBKDF2_ITERATION_COUNT,
2234+
this.kdfIterations,
22342235
WKS_ENC_KEY_LENGTH + WKS_HMAC_KEY_LENGTH);
22352236

22362237
if (derivedKey == null) {

0 commit comments

Comments
 (0)