WICKET-5756 Allow to use custom ciphers when using SunJceCrypt class

Use KeyInSessionSunJceCryptFactory by default


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/05b32f5c
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/05b32f5c
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/05b32f5c

Branch: refs/heads/pr-86-media_tags
Commit: 05b32f5ca0d4a7d7a6d7c5e4deef1d7d0668dfe0
Parents: a335df3
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Mon Feb 23 10:11:32 2015 +0200
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Mon Feb 23 10:11:32 2015 +0200

----------------------------------------------------------------------
 .../org/apache/wicket/settings/SecuritySettings.java    | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/05b32f5c/wicket-core/src/main/java/org/apache/wicket/settings/SecuritySettings.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/settings/SecuritySettings.java 
b/wicket-core/src/main/java/org/apache/wicket/settings/SecuritySettings.java
index bdc6836..1f57269 100644
--- a/wicket-core/src/main/java/org/apache/wicket/settings/SecuritySettings.java
+++ b/wicket-core/src/main/java/org/apache/wicket/settings/SecuritySettings.java
@@ -23,7 +23,7 @@ import org.apache.wicket.authorization.IAuthorizationStrategy;
 import 
org.apache.wicket.authorization.IUnauthorizedComponentInstantiationListener;
 import org.apache.wicket.authorization.IUnauthorizedResourceRequestListener;
 import org.apache.wicket.authorization.UnauthorizedInstantiationException;
-import org.apache.wicket.util.crypt.CachingSunJceCryptFactory;
+import org.apache.wicket.core.util.crypt.KeyInSessionSunJceCryptFactory;
 import org.apache.wicket.util.crypt.ICryptFactory;
 import org.apache.wicket.util.lang.Args;
 
@@ -107,15 +107,7 @@ public class SecuritySettings
        {
                if (cryptFactory == null)
                {
-                       System.err
-                               
.print("********************************************************************\n"
-                                       + "*** WARNING: Wicket is using a 
DEFAULT_ENCRYPTION_KEY            ***\n"
-                                       + "***                            
^^^^^^^^^^^^^^^^^^^^^^            ***\n"
-                                       + "*** Do NOT deploy to your live 
server(s) without changing this.  ***\n"
-                                       + "*** See 
SecuritySettings#setCryptFactory() for more information. ***\n"
-                                       + 
"********************************************************************\n");
-
-                       cryptFactory = new 
CachingSunJceCryptFactory(DEFAULT_ENCRYPTION_KEY);
+                       cryptFactory = new KeyInSessionSunJceCryptFactory();
                }
                return cryptFactory;
        }

Reply via email to