Skip to content

Commit

Permalink
Rewrite x509.certificate_managed to be easier to use
Browse files Browse the repository at this point in the history
The function now displays clearer error messages when a problem occurs
and informative messages when comparing an existing certificate.

test=True is now supported.

It fixes saltstack#52180, saltstack#39608, saltstack#41858 and others:

* Error messages from the x509 module calls are written directly to
the certificate file - fixed, the certificate file is only created
when the x509 module calls succeed.
* Certificates are created when no changes are required - fixed, the
comparison logic has been updated.

The `managed_private_key` option has been removed due to the added
complexity. The functionality can easily be replicated with an
additional call to `x509.private_key_managed`. According to the comment
at saltstack#39608 (comment)
`managed_private_key` has not worked since at least v2016.11.2.
  • Loading branch information
glynnforrest committed Apr 10, 2020
1 parent 6258f6b commit e9e49d1
Showing 1 changed file with 215 additions and 180 deletions.
Loading

0 comments on commit e9e49d1

Please sign in to comment.