SSL: Difference between revisions

From Playing with linux...
Jump to navigation Jump to search
No edit summary
Line 5: Line 5:
openssl req -subj “/CN=domain.com” -new -newkey rsa:4096 -days 3650 -nodes -x509 -sha512 -keyout private.key -out public.key
openssl req -subj “/CN=domain.com” -new -newkey rsa:4096 -days 3650 -nodes -x509 -sha512 -keyout private.key -out public.key
</pre>
</pre>
Remember: keep your private.key private. Change rights to the file accordingly so that only the application you need it in can read it.

Revision as of 08:37, 27 March 2015

Self Signed Certificate

Easiest way to create a self-signed certificate for domain.com:

openssl req -subj “/CN=domain.com” -new -newkey rsa:4096 -days 3650 -nodes -x509 -sha512 -keyout private.key -out public.key

Remember: keep your private.key private. Change rights to the file accordingly so that only the application you need it in can read it.