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

Add a check to the admin list/detail page indicating a valid chain #4

Closed
joeribekker opened this issue Sep 15, 2022 · 2 comments
Closed
Labels
enhancement New feature or request

Comments

@joeribekker
Copy link
Member

There should be a function that validates if the certificate has a valid root certificate.

This can be achieved in several ways like, having a cert with the full chain or having all intermediate certificates installed on the server. There's functions to check this (requests does it) I guess.

@joeribekker joeribekker added the enhancement New feature or request label Sep 15, 2022
CharString added a commit that referenced this issue Oct 13, 2022
Uses pyOpenSSL primitives to approximately check the validity of a
chain. And instead of using pem's in the repo that will expire, it
creates temporary fixture certificates.

Someday there might be a correct abstraction in the cryptography
library. See:
pyca/cryptography#6229
pyca/cryptography#2381
@CharString
Copy link
Contributor

@joeribekker Can you review the code and test whether #6 solves your use case?

If the root G1 is not deployed in the system cacert.pem, the check will fail.

Possible expansions:

  • add the check as a validator on the form/modelfield
  • turn the raised openssl exceptions into helpful messages
    (boolean invalid/valid isn't particularly helpful with debugging an issue)

@joeribekker
Copy link
Member Author

Fixed by #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants