Proper error message when private key cannot be located.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 11 Jun 2003 18:18:49 +0000 (18:18 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 11 Jun 2003 18:18:49 +0000 (18:18 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@626 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/hs/HandleServlet.java

index 00d68c4..e77dbf3 100644 (file)
@@ -237,6 +237,15 @@ public class HandleServlet extends HttpServlet {
                                        configuration
                                                .getProperty("edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStoreKeyPassword")
                                                .toCharArray());
+                       
+                       if (privateKey == null) {
+                               throw new HSConfigurationException(
+                                       "No key entry was found with an alias of ("
+                                               + configuration.getProperty(
+                                                       "edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStoreKeyAlias")
+                                               + ").");
+                       }
+                       
 
                        if (configuration.getProperty("edu.internet2.middleware.shibboleth.hs.HandleServlet.certAlias") != null) {
                                certificates =