--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/c6368a55-f941-4f0e-bc1a-184d0570cabb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Below is the steps that I followed to create and add self-signed certificate to java key store.
openssl genrsa -out myKey.pem 2048
openssl req -new -key myKey.pem -out csr.pem
openssl req -x509 -days 365 -key myKey.pem -in csr.pem -out myCertificate.pem
keytool -import -keystore myKeyStore -file myCertificate.pem -alias myCA
My code is,
HttpServer server = vertx.createHttpServer();
RouteMatcher routeMatcher = new RouteMatcher();
routeMatcher.get("/get", new Handler<HttpServerRequest>() {
@Override
public void handle(HttpServerRequest e) {
e.response().end("Hello world !!");
}
});
server.requestHandler(routeMatcher);
server.setSSL(true).setKeyStorePath("/home/amit/myKeyStore").setKeyStorePassword("changeit");
server.listen(3500, "localhost");
If I fire “https://localhost:3500/get” it gives me response as
This webpage is not available
I am configuring this for first time, so not able to find this issue yet.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/33e0410e-e96b-46b0-a0c3-08f6f958ce3a%40googlegroups.com.
On 7 Aug 2018, at 08:41, Adam Medeiros <adam...@gmail.com> wrote:
This is interesting. I too can't get https to work as advertised. Are there examples (or documentation) somewhere that specifies how the pem files for self-signed certificates should be generated to make this work? I generated mine as SHA265 with RSA - however, I used rsa:4096 vs. the widely used rsa:2048. Would love to see the manual on what exactly is needed for generating the self-signed certificate if they won't all work.I'll try and generate one with rsa:2048 tomorrow to see if that works, but is that true? Only very specifically created pem files work?
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/395f32d3-b38e-4911-a1ea-8602794ead3a%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/c21e616f-128d-4757-8f79-99464bffe27a%40googlegroups.com.
options = { 'ssl' => true, 'useAlpn' => true, 'pemKeyCertOptions' => { 'keyPath' => 'ssl/server-key.pem', 'certPath' => 'ssl/localhost.crt' } }
server = $vertx.create_http_server(options)
router = VertxWeb::Router.router($vertx)
done_handler = Proc.new {|c| c.response.put_header('content-type', 'application/json').end({msg: 'Received'}.to_json)}
router.route("/ping").handler(&done_handler)
server.request_handler(&router.method(:accept)).listen(8443)
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/96c9a288-ff1d-4718-a64b-43dfadd0c510%40googlegroups.com.
(NoMethodError) undefined method `ssl=' for #<Vertx::HttpServer:0x556e0956>
org.jruby.embed.EvalFailedException: (NoMethodError) undefined method `ssl=' for #<Vertx::HttpServer:0x556e0956>
at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:131)
at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:1307)
at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.java:1323)
at io.vertx.lang.ruby.ContainerHolder.create(ContainerHolder.java:133)
at io.vertx.lang.ruby.JRubyVerticle.start(JRubyVerticle.java:43)
at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$8(DeploymentManager.java:483)
at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:339)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `ssl=' for #<Vertx::HttpServer:0x556e0956>
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/7870a674-b918-4426-9301-fda87ff75b8f%40googlegroups.com.
Julien
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/7870a674-b918-4426-9301-fda87ff75b8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/5A17DBC3-0B7A-40CE-8744-9A486973C127%40julienviet.com.