JCE: use local KDF iterations in WKSPrivateKey.getDecryptedKey() in case Security property iteration count has changed

pull/108/head
Chris Conlon 2025-03-27 15:47:57 -06:00
parent 0834dbdafc
commit bda62a83a6
1 changed files with 2 additions and 1 deletions

View File

@ -1655,6 +1655,7 @@ public class WolfSSLKeyStore extends KeyStoreSpi {
} }
if (stream == null) { if (stream == null) {
log("KeyStore InputStream is null, nothing to load");
return; return;
} }
@ -2229,7 +2230,7 @@ public class WolfSSLKeyStore extends KeyStoreSpi {
* split between 32-byte AES-CBC-256 key and 64-byte * split between 32-byte AES-CBC-256 key and 64-byte
* HMAC-SHA512 key. */ * HMAC-SHA512 key. */
derivedKey = deriveKeyFromPassword(password, this.kdfSalt, derivedKey = deriveKeyFromPassword(password, this.kdfSalt,
WKS_PBKDF2_ITERATION_COUNT, this.kdfIterations,
WKS_ENC_KEY_LENGTH + WKS_HMAC_KEY_LENGTH); WKS_ENC_KEY_LENGTH + WKS_HMAC_KEY_LENGTH);
if (derivedKey == null) { if (derivedKey == null) {