Repository navigation
Sbat code generation improves - #793
Merged
Merged
Conversation
Contributor
Author
|
How to add some reviewers? |
Contributor
Author
|
ping |
Not used outside of the program. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
They should not be changed. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
The function was always returning true (!= 0), make it returns 0 on success like writefile function. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
…tion list Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
The rest of the file use tabs. Just style change. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
More readable. Just style change. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
The number can't be negative, this allows sscanf to be more strict about it. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Use continue to reduce function indentation. Just style change. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Although unlikely fgets can return NULL with file read errors. Detect them. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Just style change. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Give some indication of the failures. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
The epoch line should be the first revocation list. There should be no 2 epoch revocations. Other revocations should be after the epoch. These should be detected probably by compiling the resulting code but better to be explicit. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
In case the revocation string is the epoch revocation the string was not terminated. Currently the string is not used but better to be safer. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
…ctly The code was potentially stripping last not-newline character from last line. Although most editors finish text files with a new line this is not always true and could lead to security issues (think about a "component,12" revocation parsed as a "component,1" revocation). Normalize the string line stripping only the newline terminator. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Make sure they are in the format XXXX,nn where X are not commas or spaces and n are just digits. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Add an "autogenerated" comment. Separate default GEN_SBAT_VAR_DEFS_H_ definition with an extra empty line. No functional changes. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
If you had more than 1 argument the first was ignored treating as no arguments were given. Instead ignore remaining argument. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
No parameters declaration is more K&R or C++ style. Some recent compilers complain about it. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #793 +/- ##
=======================================
Coverage 58.82% 58.82%
=======================================
Files 24 24
Lines 4223 4223
Branches 654 654
=======================================
Hits 2484 2484
Misses 1468 1468
Partials 271 271 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
This PR contains improves to the code to generate SBAT files from
SbatLevel_Variable.txt.Mostly are style changes, some others more strict checks in order to avoid some possible errors.
Specific commits contain more explanation.
readfileerror checkboolforepochfounddatefieldwritefilefunction