Skip to content

Conversation

@UBOK19
Copy link

@UBOK19 UBOK19 commented Apr 7, 2022

No description provided.

UBOK19 and others added 30 commits March 3, 2021 15:16
@UBOK19 UBOK19 requested a review from gruenwaldi April 7, 2022 12:03
Copy link

@gruenwaldi gruenwaldi left a comment

Choose a reason for hiding this comment

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

please check and work on comments

if r.status_code == 200:
logger.info("The UPP is known to the uBirch backend! (code: %d)" % r.status_code)

jobj = json.loads(r.content)

Choose a reason for hiding this comment

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

please rename jobj

- [Generating and managing a keypair](#generating-and-managing-a-keypair)
- [Registering a public key](#registering-a-public-key)
- [Gathering Data](#gathering-data)
- [Creating an UPP](#creating-an-upp)

Choose a reason for hiding this comment

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

it is a UPP , not an UPP. Please check the whole file

When working with `chained UPPs` it can be useful to check whether the chain is in order and valid. For
this task, the [`upp-chain-checker.py`](upp-chain-checker.py) can be used. It reads in a list of UPPs,
checks the signature of each UPP and compares the `prevsig` field with the `signature` of the last UPP.
If at any point something doesn't match up, it will print an error message alonge with the number of the

Choose a reason for hiding this comment

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

typo in alonge

logger.info("UPP [hex]: \"%s\"" % binascii.hexlify(self.upp).decode())

# try to write the upp
with open(self.output, "wb") as fd:

Choose a reason for hiding this comment

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

change fd to file


def store_response_upp(self) -> bool:
try:
with open(self.output, "wb") as fd:

Choose a reason for hiding this comment

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

change fd to file



if __name__ == "__main__":
sys.exit(Main().run()) No newline at end of file

Choose a reason for hiding this comment

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

add newline

try:
logger.info("Reading the input UPP from \"%s\"" % self.input)

with open(self.input, "rb") as fd:

Choose a reason for hiding this comment

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

see comment above



if __name__ == "__main__":
sys.exit(Main().run()) No newline at end of file

Choose a reason for hiding this comment

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

add newline


self.assertEqual(hashlib.sha256(b"UBIRCH").digest(), unpacked[3])
self.assertEqual(p.verfiy_signature(UUID(bytes=unpacked[1]), message), True)
self.assertEqual(hashlib.sha256(b"UBIRCH").digest(), unpacked[3])

Choose a reason for hiding this comment

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

look for legacy trackle test and comment it out

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.

3 participants