CubeSQL fully supports SSL encryption and sometimes it is very useful to be able to create self-signed SSL certificates for the localhost. At SQLabs we use SSL certificates for local development but they can also be used for in-house deployment, without the need to purchase a dedicated domain.
This method uses the OpenSSL command-line utility and it requires three easy steps from the Terminal:
# openssl req -x509 -out localhost.crt -keyout localhost.key -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' -extensions EXT -config <(printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth") # cat localhost.crt localhost.key > cubesql.pem
Copy the resulting
cubesql.pem file to your main cubesql folder.