Moved handle secret keystore to Classpath.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 18 Feb 2003 21:19:51 +0000 (21:19 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 18 Feb 2003 21:19:51 +0000 (21:19 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@473 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/AAServlet.java
src/edu/internet2/middleware/shibboleth/hs/HandleServlet.java
src/edu/internet2/middleware/shibboleth/hs/provider/CryptoHandleRepository.java
webApplication/WEB-INF/classes/conf/handle.jks [moved from webApplication/WEB-INF/conf/handle.jks with 100% similarity]
webApplication/WEB-INF/classes/conf/origin.properties

index b16b4a0..a40b81c 100755 (executable)
@@ -166,7 +166,7 @@ public class AAServlet extends HttpServlet {
                        "edu.internet2.middleware.shibboleth.aaLocal.EchoCtxFactory");
                defaultProps.setProperty(
                        "edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStorePath",
-                       getServletContext().getRealPath("/conf/handle.jks"));
+                       "/conf/handle.jks");
 
                //Load from file
                Properties properties = new Properties(defaultProps);
index 5b5e0da..dec11bf 100644 (file)
@@ -106,7 +106,7 @@ public class HandleServlet extends HttpServlet {
                defaultProps.setProperty("edu.internet2.middleware.shibboleth.hs.HandleServlet.issuer", "shib2.internet2.edu");
                defaultProps.setProperty(
                        "edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStorePath",
-                       getServletContext().getRealPath("/WEB-INF/conf/handle.jks"));
+                       "/conf/handle.jks");
 
                //Load from file
                Properties properties = new Properties(defaultProps);
index 0751e6b..c58ae09 100644 (file)
@@ -75,6 +75,7 @@ import sun.misc.BASE64Decoder;
 import sun.misc.BASE64Encoder;
 
 import edu.internet2.middleware.shibboleth.common.AuthNPrincipal;
+import edu.internet2.middleware.shibboleth.common.ShibResource;
 import edu.internet2.middleware.shibboleth.hs.HandleRepository;
 import edu.internet2.middleware.shibboleth.hs.HandleRepositoryException;
 
@@ -95,9 +96,11 @@ public class CryptoHandleRepository extends BaseHandleRepository implements Hand
                        KeyStore keyStore = KeyStore.getInstance("JCEKS");
 
                        keyStore.load(
-                               new FileInputStream(
+                               new ShibResource(
                                        properties.getProperty(
-                                               "edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStorePath")),
+                                               "edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStorePath"),
+                                       this.getClass())
+                                       .getInputStream(),
                                properties
                                        .getProperty("edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStorePassword")
                                        .toCharArray());
index 7559ad4..b4edc6e 100755 (executable)
@@ -15,9 +15,10 @@ java.naming.factory.initial=edu.internet2.middleware.shibboleth.aaLocal.EchoCtxF
 edu.internet2.middleware.shibboleth.hs.HandleRepository.implementation = edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository
 edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStoreKeyPassword = shibhs
 edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStoreKeyAlias = handleKey
-#edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStorePath =
+edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStorePath = /conf/handle.jks
 edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStorePassword = shibhs
 
+
 #edu.internet2.middleware.shibboleth.hs.HandleRepository.implementation = edu.internet2.middleware.shibboleth.hs.provider.MemoryHandleRepository
        
 edu.internet2.middleware.shibboleth.hs.BaseHandleRepository.handleTTL = 10000