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

Blob initialization fix-1 #3735

Merged
merged 6 commits into from
Jan 18, 2023
Merged

Conversation

aditishri18
Copy link
Contributor

@aditishri18 aditishri18 commented Dec 28, 2022

Resolved issues:

There are many blobs in s2n that have been created without using the s2n_init function and do not follow the new criteria.
This PR fixes that, and uses s2n_blob_init to initialize blobs.

Description of changes:

Initialization of blobs in s2n using the s2n_init function.

Call-outs:

Since there are many changes, I will have multiple PR's out for this issue.

Testing:

All tests pass

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the s2n-core team label Dec 28, 2022
@aditishri18 aditishri18 force-pushed the blob_initialization_fix branch from c4cf15b to 52ebedf Compare January 4, 2023 02:57
@aditishri18 aditishri18 marked this pull request as ready for review January 4, 2023 04:25
@aditishri18 aditishri18 requested a review from goatgoose January 5, 2023 03:14
@harrisonkaiser
Copy link
Contributor

harrisonkaiser commented Jan 5, 2023

We probably want to add this it s2n-tls/codebuild/bin/grep_simple_mistakes.sh so we don't have regressions in the future. You can use a regex like this one to find instances that should be replaced:

struct\s+s2n_blob\s+[a-zA-Z_][a-zA-Z0-9_]*\s*=\s*{\s*\.(data|size)\s*=\s*[^;]*,\s*\.(data|size)\s*=\s*[^;]*\s*};

Here it is in a regex editor with some examples.

@aditishri18 aditishri18 requested a review from goatgoose January 17, 2023 18:06
@aditishri18 aditishri18 changed the title Blob initialization fix Blob initialization fix-1 Jan 17, 2023
Copy link
Contributor

@maddeleine maddeleine left a comment

Choose a reason for hiding this comment

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

What are your plans for addressing the rest of the un-initialized blobs? I see you say in the PR description you are going to put out more PRs for this issue, but it looks like your PR will resolve the initial issue keeping track of this.

@aditishri18
Copy link
Contributor Author

I have a draft PR ready at the moment, should be able to wrap up in 2-3 more PR's.

@aditishri18 aditishri18 enabled auto-merge (squash) January 17, 2023 23:52
@aditishri18 aditishri18 merged commit 97bed6e into aws:main Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants