Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support creating multiple certificates from a single private CA #3

Open
sgallagher opened this issue Mar 4, 2017 · 5 comments
Open
Assignees
Milestone

Comments

@sgallagher
Copy link
Owner

There may be times when we want to create several certificates at once (for example for a test-cluster of machines). SSCG should be able to take a configuration file (INI? YAML? JSON?) describing the different subject definitions for these certificates.

@sgallagher sgallagher added this to the 2.1.0 milestone Mar 4, 2017
@sgallagher sgallagher self-assigned this Mar 4, 2017
@sgallagher sgallagher modified the milestones: 2.1.0, 3.0.0 Dec 18, 2017
@jamescassell
Copy link

Would be an awesome feature!

@sgallagher
Copy link
Owner Author

@jamescassell I haven't done this yet because I'm wary of sscg getting as complex as the openssl CLI tool, but I'd happily look into it if you have some suggestions on an input format that is fairly approachable.

@jamescassell
Copy link

A good workaround with the existing functionality is to just use the SAN list and copy the same key to all the hosts that need it.

@cipherboy
Copy link

@sgallagher (I was just looking for this myself now) -- another alternative that might be easier would be up-front generation with a single CA, but multiple target certs. Perhaps using -- as a separator, could you parse arguments given multiple times and generate multiple certs as a result?

$ sscg \
    -- --subject-alt-name='IP:127.0.0.1/255.0.0.0' --cert-file=/path/to/1.pem --cert-key-file=/path/to/1.key \
    -- --subject-alt-name='IP:127.0.0.2/255.0.0.0' --cert-file=/path/to/2.pem --cert-key-file=/path/to/2.key \
    -- --client-file=alex.pem --client-key-file=alex.key --email 'alex@example.com' \
    -- --client-file=bob.pem --client-key-file=bob.key --email 'bob@example.com'

This has the added benefit of CA key destruction by default, rather than having to persist it. CA cert options could only allowed once (to simplify the logic), but otherwise the rest might be fairly doable after restructuring argument parsing? Just an idea :-)

@sgallagher
Copy link
Owner Author

That's an interesting suggestion. Definitely would require a significant rework of the argument parser.

I'll look into that in the near future.

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

No branches or pull requests

3 participants