OpenSSL

From Glee
Jump to: navigation, search

Keys

Example for 2048 bit RSA key generation :

openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 2048 > my.key

Certificate Signing Requests (CSR)

Example CSR generation based on a previously generated key :

openssl req -new -key my.key -out my.csr

Checking the content of a CSR file :

openssl req -in my.csr -text

Self-Signed Certificates

Example Self-Signed Certificate generation based on a previously generated key :

openssl req -new -key my.key -x509 -days 4000 -set_serial $RANDOM -out my.crt

Checking the content of a Certificate file :

openssl x509 -in my.crt -text

Certificate Authority

Use OpenVPN's easy-rsa : https://github.com/OpenVPN/easy-rsa