[java-support] branch maint-7 updated: Fix some issues with deferred init option.
Scott Cantor
cantor.2 at osu.edu
Tue Jul 31 17:28:42 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch maint-7
in repository java-support.
View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=b72ecbbc172712306f828111630af7474ae66400
The following commit(s) were added to refs/heads/maint-7 by this push:
new b72ecbb Fix some issues with deferred init option.
b72ecbb is described below
commit b72ecbbc172712306f828111630af7474ae66400
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