Commit Graph

2 Commits (2e560caf68304319595917f4fa6154108c276a3c)

Author SHA1 Message Date
Herman Slatman 2e560caf68
Add some basic tests for `GenerateConfig`
So far the `GenerateConfig` method wasn't tested. This commit adds
a couple of basic tests for this method. It's not fully covered yet,
nor are all properties being checked, but it provides a starting
point for refactoring the CA (configuration) initialization process.
8 months ago
Herman Slatman 3c084822b3
Prevent invalid provisioner name on `step ca init`
An unfortunate combination of `--provisioner acme` and the `--acme`
flags on `step ca init` could lead to an invalidat CA configuration.
This commit prevent this case from happening. A similar error could
occur for the `sshpop` provisioner, so a fix was implemented for that
case too.

The fix doesn't catch all cases, e.g. it doesn't check for multiple
provisioners having the same `acme-` or `sshpop-` prefix. The code
that is called is intended to be only called from a `step ca init`
invocation, so should work for these cases, but might not if the
methods are invoked at other times.
8 months ago