Re: Personal CA: are cert serial numbers critical?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/08/2017 19:54, Robert Moskowitz wrote:


On 08/16/2017 01:12 PM, Viktor Dukhovni wrote:
On Aug 16, 2017, at 12:52 PM, Robert Moskowitz <rgm@xxxxxxxxxxxxxxx> wrote:

Which is also a problem in openssl. You have to put the SAN into the cnf file. There are a number of hacks to do this from the command line.
Yep.  For an approach that uses "bash" in-line files see:

https://github.com/openssl/openssl/blob/master/test/certs/mkcert.sh#L95

I prefer something like this:

openssl req -new -sha256 -key domain.key -subj "/C=US/ST=CA/O=Acme, Inc./CN=example.com"\ -reqexts SAN -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:example.com,DNS:www.example.com"))\
 -out domain.csr
Another option is to use a config file that includes environment variables
in the relevant fields.

So it becomes something like
export FOREMAIL=moe@xxxxxxxxxxx
export FORUSER="Moe Madman"
export CERTFN=moe
openssl req -config /etc/cacfg/ca2017-mail.conf -newkey rsa:3072 -keyout ${CERTFN}.key -out ${CERTFN}.csr

Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux