java - Easiest way to do SSLSocketServer (certificate generation at runtime) -


i want simple way create sslserversocket. self-signed certificate generated , used @ runtime because data needs protected, isn't super important very, secure.

i found tutorials on making sslserversocket assume had proper certificate.

psuedo-code, code examples , simple paragraph acceptable answers.

the easiest way may invoking external program. openssl great tool many encryption things... make self signed cert with:

openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout www.example.com.pem  -out www.example.com.pem 

you run such generation runtime.exec() or using processbuilder.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -