Skip to content

Commit

Permalink
refactor: add comments, fix review findings
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Stypa <[email protected]>
  • Loading branch information
robertstypa committed Nov 7, 2023
1 parent dc925d7 commit bb1aefa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
9 changes: 4 additions & 5 deletions suit_generator/suit/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@
Code inspired by/based on https://github.com/tomchy/suit-composer.
"""
from __future__ import annotations

import json
from dataclasses import dataclass
from typing import cast

from suit_generator.logger import log_call
import functools
import cbor2
import binascii
import logging
import struct
import json

import cbor2

from suit_generator.logger import log_call
from suit_generator.suit.types.keys import suit_integrated_payloads, suit_integrated_dependencies
from suit_generator.exceptions import GeneratorError

Expand Down
2 changes: 2 additions & 0 deletions tests/fuzz/fuzz_suit_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ def fuzz_full_path(data):
cbor2 = env2.to_cbor()
assert cbor1.hex() == cbor2.hex()
except ValueError:
# ValueError is expected for some payloads since it's used by all suit-generator levels to report
# not valid data.
pass


Expand Down
2 changes: 2 additions & 0 deletions tests/fuzz/fuzz_suit_tstr.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def fuzz_tstr(data):
fuzz_bytes = fdp.ConsumeBytes(16)
SuitTstr.from_cbor(fuzz_bytes)
except ValueError:
# ValueError is expected for some payloads since it's used by all suit-generator levels to report
# not valid data.
pass


Expand Down
2 changes: 2 additions & 0 deletions tests/fuzz/fuzz_suit_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ def fuzz_yaml_component_id(data):
env2 = SuitEnvelopeTagged.from_cbor(cbor1)
env2.to_cbor()
except ValueError:
# ValueError is expected for some payloads since it's used by all suit-generator levels to report
# not valid data.
pass


Expand Down

0 comments on commit bb1aefa

Please sign in to comment.