Example #1
0
 private void configureSslKeyStore(AbstractHttp11JsseProtocol<?> protocol, Ssl ssl) {
   try {
     protocol.setKeystoreFile(ResourceUtils.getURL(ssl.getKeyStore()).toString());
   } catch (FileNotFoundException ex) {
     throw new EmbeddedServletContainerException(
         "Could not load key store: " + ex.getMessage(), ex);
   }
   if (ssl.getKeyStoreType() != null) {
     protocol.setKeystoreType(ssl.getKeyStoreType());
   }
   if (ssl.getKeyStoreProvider() != null) {
     protocol.setKeystoreProvider(ssl.getKeyStoreProvider());
   }
 }