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

Use raw signature-params instead of self-construct one. #22

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

Conversation

Gh0u1L5
Copy link

@Gh0u1L5 Gh0u1L5 commented Aug 17, 2023

Currently the verifier uses a self-constructed "@signature-params" when verifying the signature. However, the order of signature params is not strictly defined in the standard.

For example, the following example is given in Section 2.3 of revision 19.

("@target-uri" "@authority" "date" "cache-control")\
  ;keyid="test-key-rsa-pss";alg="rsa-pss-sha512";\
  created=1618884475;expires=1618884775

Next example is generated by Python library requests-http-signature.

("@method" "@authority" "@path" "@query" "content-digest" "date");created=1692263726;keyid="d8676596-40a7-4e1d-95fa-fa375147b65c";expires=1692263786;alg="hmac-sha256"

Both of them are valid, but will fail our verification. So I suggest we can just use the raw params data to compose the signable.

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.

None yet

1 participant