Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that by adding/modifying the SubjectAltName entry in openssl.cnf this can be achieved, but is there a way to do so without having to modify that file every time?

share|improve this question
up vote 1 down vote accepted

In openssl.cnf at the top add the entry SAN = "email:copy" (to have a default value in case the environment variable SAN is not set) and in the respective section use SubjectAltName = ${ENV::SAN}. Now just call SAN="email:copy, email:adress@two" openssl ..., where email:copy makes sure the main address is used as well. (Adapted from here)

share|improve this answer
note to self: If your only access is via SSH, make sure your openssl.conf is valid. The simplest check is trying to establish a second connection (or scp something) without cutting the first one – Tobias Kienzler Mar 12 '13 at 13:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.