[java-support] branch master updated: Fix some issues with deferred init option.
Ian Young
ian at iay.org.uk
Mon Aug 13 08:54:24 EDT 2018
This is an automated email from the git hooks/post-receive script.
iay pushed a commit to branch master
in repository java-support.
View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=57f15afee6023e483fad99d43a7b956a3bbf4045
The following commit(s) were added to refs/heads/master by this push:
new 57f15af Fix some issues with deferred init option.
57f15af is described below
commit 57f15afee6023e483fad99d43a7b956a3bbf4045
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jul 31 17:28:38 2018 -0400
Fix some issues with deferred init option.
---
.../support/security/BasicKeystoreKeyStrategy.java | 28 ++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/src/main/java/net/shibboleth/utilities/java/support/security/BasicKeystoreKeyStrategy.java b/src/main/java/net/shibboleth/utilities/java/support/security/BasicKeystoreKeyStrategy.java
index 4131ae8..3f16d57 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/security/BasicKeystoreKeyStrategy.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/security/BasicKeystoreKeyStrategy.java
@@ -150,10 +150,20 @@ public class BasicKeystoreKeyStrategy extends AbstractInitializableComponent imp
*/
public void setKeystorePassword(@Nullable final String password) {
synchronized(this) {
- if (password != null && !password.isEmpty())
+ if (password != null && !password.isEmpty()) {
keystorePassword = password;
- else
+
+ if (isInitialized() && keyPassword != null) {
+ try {
+ updateDefaultKey();
+ } catch (final KeyException e) {
+ // Logged inside update method.
+ }
+ }
+ }
+ else {
keystorePassword = null;
+ }
}
}
@@ -176,10 +186,20 @@ public class BasicKeystoreKeyStrategy extends AbstractInitializableComponent imp
*/
public void setKeyPassword(@Nullable final String password) {
synchronized(this) {
- if (password != null && !password.isEmpty())
+ if (password != null && !password.isEmpty()) {
keyPassword = password;
- else
+
+ if (isInitialized() && keystorePassword != null) {
+ try {
+ updateDefaultKey();
+ } catch (final KeyException e) {
+ // Logged inside update method.
+ }
+ }
+ }
+ else {
keyPassword = null;
+ }
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list