Skip to content

Add --with-san flag to allow generating cert with SAN#3

Merged
dmcgowan merged 1 commit intodmcgowan:masterfrom
thaJeztah:support_san
Apr 9, 2020
Merged

Add --with-san flag to allow generating cert with SAN#3
dmcgowan merged 1 commit intodmcgowan:masterfrom
thaJeztah:support_san

Conversation

@thaJeztah
Copy link
Contributor

This adds a --with-san flag that, when set, will generate a single certificate with the provided hosts added as Subject Alternative Name (SAN) instead of generating a separate certificate for each host.

For example:

quicktls -with-san domain-one.example.org domain-two.example.org localhost 127.0.0.1

ls -l
total 24
-rw-r--r--  1 sebastiaan  staff  1094 Apr  9 17:14 ca.pem
-rw-r--r--  1 sebastiaan  staff  1208 Apr  9 17:14 domain-one.example.org.cert
-rw-------  1 sebastiaan  staff  1675 Apr  9 17:14 domain-one.example.org.key

openssl x509 -text -noout -in ./domain-one.example.org.cert
...
X509v3 extensions:
    X509v3 Subject Alternative Name:
        DNS:domain-one.example.org, DNS:domain-two.example.org, DNS:localhost, IP Address:127.0.0.1
...

This adds a `--with-san` flag that, when set, will generate a
single certificate with the provided hosts added as Subject
Alternative Name (SAN) instead of generating a separate
certificate for each host.

For example:

    quicktls -with-san domain-one.example.org domain-two.example.org localhost 127.0.0.1

    ls -l
    total 24
    -rw-r--r--  1 sebastiaan  staff  1094 Apr  9 17:14 ca.pem
    -rw-r--r--  1 sebastiaan  staff  1208 Apr  9 17:14 domain-one.example.org.cert
    -rw-------  1 sebastiaan  staff  1675 Apr  9 17:14 domain-one.example.org.key

    openssl x509 -text -noout -in ./domain-one.example.org.cert
    ...
    X509v3 extensions:
        X509v3 Subject Alternative Name:
            DNS:domain-one.example.org, DNS:domain-two.example.org, DNS:localhost, IP Address:127.0.0.1
    ...

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Contributor Author

@dmcgowan PTAL

Copy link
Owner

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmcgowan dmcgowan merged commit 47ecad7 into dmcgowan:master Apr 9, 2020
@thaJeztah thaJeztah deleted the support_san branch April 9, 2020 21:09
@thaJeztah
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants