OpenSSL↗
# List Curves
openssl ecparam -list_curves
# Create key
openssl genrsa -out ca.pem 2048
openssl ecparam -name prime256v1 -genkey -noout -out ca.pem
# Create Self Sign Certificate
openssl req -new -x509 -key ca.pem -out ca.pem -sha256 -days 360 \
-subj "/C=US/ST=California/L=San Francisco/O=My Company/OU=IT/CN=localhost" \
-addext "subjectAltName = DNS:localhost, DNS:example.local, IP:127.0.0.1"
# Check Certificate Contents
openssl x509 -text -noout -in ca.crt
### Create end-user cert
# Create your key
openssl genrsa -out mykey.pem 4096
openssl ecparam -name prime256v1 -genkey -noout -out mykey.pem
# Create CSR
openssl req -new -key mykey.pem -out mykey.csr -sha512 \
-subj "/C=US/ST=California/L=San Francisco/O=My Company/OU=IT/CN=localhost" \
-addext "subjectAltName = DNS:localhost, DNS:example.local, IP:127.0.0.1"
# Check CSR Contents
openssl req -text -noout -verify -in mykey.csr
openssl x509 -req -sha384 -days 365 -in mykey.csr -CA ca.crt -CAkey ca.pem -set_serial 01 -out mycert.crt
openssl x509 -in mycert.crt -text -noout
### Test TLS
# Test tls
openssl s_client -connect example.com:443 -servername example.com
# Test Certificates
openssl s_server -accept 4433 -cert server.crt -key server.key
Tutorial
Ansible↗
# Encrypt file
ansible-vault encrypt $YOUR_FILE
# Decrypt
ansible-vault decrypt $YOUR_FILE
Tutorial
Croc↗
# Send files
croc send $YOUR_FILE
# Receive files
croc $CODE_PHRASE
Website