Generating a self-signed certificate is a common task and the command to generate one with openssl
is well known and well documented. Generating a certificate that includes subjectAltName is not so straght forward however. The following example demonstrates how to generate a SAN certificate without making a permanent change to the openssl configuration.
$ export SAN="DNS:www.domain.localdomain,DNS:domain.localdomain"