feat(cawg): Implement remote signing for X509CredentialHolder#1865
Draft
BadrTad wants to merge 7 commits intocontentauth:mainfrom
Draft
feat(cawg): Implement remote signing for X509CredentialHolder#1865BadrTad wants to merge 7 commits intocontentauth:mainfrom
BadrTad wants to merge 7 commits intocontentauth:mainfrom
Conversation
# Conflicts: # Cargo.lock
496acb6 to
fa6bec5
Compare
| use openssl::x509::X509; | ||
|
|
||
| /// Macro for converting X509 certificate stack to DER format | ||
| macro_rules! cert_chain_to_der { |
Collaborator
There was a problem hiding this comment.
If possible, can we do this with a function rather than a macro?
Author
There was a problem hiding this comment.
Most definitely, on second thought this should indeed be a function. Thanks
Collaborator
scouten-adobe
left a comment
There was a problem hiding this comment.
I'm leaving on vacation shortly and won't have time to do a full review before I go. I've asked @gpeacock to review it hopefully next week.
… of impl functions with RawSigner trait definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes in this pull request
This PR implements CAWG remote signing (as requested in #1777 ) by introducing a new type
raw_signer:: RemoteRawSignerThe feature could be tested by enabling the "remote_signing" feature during compilation. and remote signers created with this new method
create_signer::from_remote_urlThe remote_signing is supported only for openssl crypto provider.
The code snippet that converts X509 certificates from PEM to DER in raw_signature::openssl crate was also refactored as a macro under
raw_signature::openssl::cert_chain::cert_chain_to_der!The remote signer could be created by providing a setting configuration to
Contextstruct or by instantiatingX509CredentialHolderfrom aopenssl::signers::remote_signer::RemoteRawSigner.Tests use the
httpmockcrate to create mock servers that responds with valid signature using a (local) signer instantiated withcreate_signer::from_keys.Checklist
TO DOitems (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.