title: Run Vertx httpServer SSL groovy
body: <p>I´m trying to create an HttpServer working on SSL with Groovy, but I´m not able to make it works, and I cannot find a good code example or documentation about it.</p>
  
  <p>Here the code base that I did so far</p>
  
  <pre><code>    Map options = new HashMap()
      options.put("tcpKeepAlive",true)
      options.put("verifyHost", true)
      options.put("trustAll", false)
      options.put("keyCertOptions", new JksOptions().setPath("keystore.jks").setPassword("CosPassword123"))
      options.put("ssl", true)
      vertx.createHttpServer(options).requestHandler(router.&amp;accept).listen(9000, { response -&gt;
  if (response.succeeded()) {
      startFuture.complete()
  } else {
      startFuture.fail(response.cause())
  }
      })
  </code></pre>
  
  <p>When When I run it I receive the exception</p>
  
  <pre><code>       io.vertx.core.VertxException: io.vertx.core.VertxException: Key/certificate is mandatory for SSL
  at io.vertx.core.net.impl.SSLHelper.createContext(SSLHelper.java:303)
  at io.vertx.core.net.impl.SSLHelper.getContext(SSLHelper.java:458)
  at io.vertx.core.net.impl.SSLHelper.validate(SSLHelper.java:472)
  at io.vertx.core.http.impl.HttpServerImpl.listen(HttpServerImpl.java:219)
  at io.vertx.core.http.impl.HttpServerImpl.listen(HttpServerImpl.java:191)
  at io.vertx.groovy.core.http.HttpServer.listen(HttpServer.groovy:178)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrap.invoke(PogoMetaMethodSite.java:190)
  at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:71)
  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
  at com.tesco.price.mocks.identity.IdentityMock.startServer(IdentityMock.groovy:67)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
  at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
  at com.tesco.price.mocks.identity.IdentityMock.start(IdentityMock.groovy:29)
  at io.vertx.lang.groovy.GroovyVerticle$1.start(GroovyVerticle.groovy:93)
  at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$8(DeploymentManager.java:434)
  at io.vertx.core.impl.ContextImpl.lambda$wrapTask$3(ContextImpl.java:359)
  at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:339)
  at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:393)
  at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:742)
  at java.lang.Thread.run(Thread.java:745)
  </code></pre>