Skip to content

Commit bda62a8

Browse files
committed
JCE: use local KDF iterations in WKSPrivateKey.getDecryptedKey() in case Security property iteration count has changed
1 parent 0834dbd commit bda62a8

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
@@ -1655,6 +1655,7 @@ public synchronized void engineLoad(InputStream stream, char[] password)
16551655
}
16561656

16571657
if (stream == null) {
1658+
log("KeyStore InputStream is null, nothing to load");
16581659
return;
16591660
}
16601661

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

22352236
if (derivedKey == null) {

0 commit comments

Comments
 (0)