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

Fix export signature verification #40

Closed
wants to merge 4 commits into from
Closed

Conversation

r-n-o
Copy link
Collaborator

@r-n-o r-n-o commented May 9, 2024

Draft to retrieve the actual signed bytes from the bundle.

Copy link
Contributor

@andrewkmin andrewkmin left a comment

Choose a reason for hiding this comment

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

🐐

export/index.template.html Show resolved Hide resolved
Copy link
Contributor

@andrewkmin andrewkmin left a comment

Choose a reason for hiding this comment

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

🏅

if (signedData === null || signedData.length !== 2) {
throw new Error(`unable to find signed data in bundle: ${bundle}`);
}
const signedDataBytes = new TextEncoder().encode(signedData[1] + "}");
Copy link
Contributor

Choose a reason for hiding this comment

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

could add the same comments from export/index.template.html, but totally optional

@r-n-o
Copy link
Collaborator Author

r-n-o commented May 9, 2024

Closing this PR, we've decided to fix this at the enclave level instead. The idea: return the actual signed bytes. That way there's no funny regex/parsing business that needs to happen, we can just grab this from the bundle and call verifySignature without further ado.

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