Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Configuring SSL context at runtime

Certificate creation at runtime is non-trivial.
There also exists no API or library for such a task. (unless you consider using Runtime.exec or ProcessBuilder to call system tools an API)
Also know that once the SslContextFactory is created and started, it cannot change.

But if you want to try, you'll want to configure SslContextFactory in jetty before you start the jetty server.
(once the server is started, you cannot change the SslContextFactory, the underlying TrustManager, or the underlying KeyStore)

When you create the the SslContextFactory, you can provide your own KeyStore, but managing that KeyStore is out of scope for jetty, see your Java documentation for that.

Know however, that much of the SSL layer expects content from a filesystem somewhere, so you'll want to get intimately familiar with SslContextFactory and understand its needs as well.

Best of luck,

--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Developer advice, services and support
from the Jetty & CometD experts


On Thu, Jun 20, 2013 at 10:30 AM, Gaurav Kumar <gauravphoenix@xxxxxxxxx> wrote:
I asked this question on SO but haven't got correct answer- 

I am hoping someone on this list can help. 

Basically, I need to create a certificate and assign it to the servlet context at run time in Jetty. Is it possible?

Thanks,
Gaurav

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top