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

Remove cose.Verify1 and update cose.Sign1 #67

Merged
merged 4 commits into from May 20, 2022

Conversation

qmuntal
Copy link
Contributor

@qmuntal qmuntal commented May 16, 2022

This PR implements what has been discussed at #64:

  • Remove cose.Verify1. It is not clear which use case does it cover, as one normally wants to have the decoded payload, not only verify a message, but this function only does the later.
  • Update cose.Sign1 to also perform the encoding of the message and return the encoded bytes instead of a Sign1Message struct.

Closes #64

Signed-off-by: qmuntal qmuntaldiaz@microsoft.com

Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
Copy link
Contributor

@thomas-fossati thomas-fossati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

sign1.go Outdated Show resolved Hide resolved
sign1.go Outdated Show resolved Hide resolved
example_test.go Show resolved Hide resolved
example_test.go Outdated Show resolved Hide resolved
Co-authored-by: Shiwei Zhang <shizh@microsoft.com>
Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
@qmuntal qmuntal requested a review from shizhMSFT May 18, 2022 21:54
example_test.go Outdated Show resolved Hide resolved
Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
@qmuntal qmuntal requested a review from shizhMSFT May 19, 2022 09:25
Copy link
Contributor

@yogeshbdeshpande yogeshbdeshpande left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yogeshbdeshpande yogeshbdeshpande merged commit cb68acd into veraison:main May 20, 2022
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.

Make Sign1 and Verify1 difficult to misuse
4 participants