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

Adding feature to allow a callable as the signing key #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewjroth
Copy link

I made modifications to the CertificateBuilder.build to allow for a callable to be used as the private key. This will allow downstream usage of a key that leverages an external process or custom code to calculate the signature while maintaining the core functionality of assembling the x509 certificate.

Example usage:
test_callable_key.py

I tried to figure out how to verify that the signature is valid, but couldn't find a way to test it that was super complicated.

While the example is mostly pointless, this feature could be useful when attempting to use a key maintained in an external key store, such as with a hardware security module (HSM), AWS KMS, or other key signing service.

I initially asked if this was possible in pyca/cryptography#5921, which I found to be extremely difficult to try to build in.

Thanks for your consideration!

@andrewjroth
Copy link
Author

I realize I got a "all checks have failed" from the integration tests, but I believe those failures are because of misconfigured tooling that I can't fix.

@sodre
Copy link

sodre commented Mar 31, 2021

@andrewjroth, sorry I did not notice you had created a similar PR #11.

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