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

Ung 1067 verfication #17

Open
wants to merge 70 commits into
base: master
Choose a base branch
from
Open

Ung 1067 verfication #17

wants to merge 70 commits into from

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())

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())

Choose a reason for hiding this comment

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

add newline

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.

2 participants