Skip to content

Commit

Permalink
fix:(core.ssl): prevent SSLManager to updated keystore password if pa…
Browse files Browse the repository at this point in the history
…ssword did not change (#4192)

* fix(core.ssl): prevent SSLManager to update keystore password update when password did not change

Signed-off-by: Marcello Martina <martina.marcello.rinaldo@outlook.com>

* chore(SSLManagerServiceImpl): removed unused imports

Signed-off-by: Marcello Martina <martina.marcello.rinaldo@outlook.com>

* chore(SSLManagerServiceImpl): updated copyright headers

Signed-off-by: Marcello Martina <martina.marcello.rinaldo@outlook.com>

Signed-off-by: Marcello Martina <martina.marcello.rinaldo@outlook.com>
  • Loading branch information
marcellorinaldo committed Nov 3, 2022
1 parent 0b5aad5 commit 0cf89d1
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2018 Eurotech and/or its affiliates
* Copyright (c) 2011, 2022 Eurotech and/or its affiliates
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -307,7 +307,10 @@ private void accessKeystore() {
} catch (KuraException e) {
logger.warn("Failed to decrypt keystore password");
}
updateKeystorePassword(oldPassword, newPassword);

if (!Arrays.equals(oldPassword, newPassword)) {
updateKeystorePassword(oldPassword, newPassword);
}
}
}

Expand Down

0 comments on commit 0cf89d1

Please sign in to comment.