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

Add ability to sign files in naruno/lib/sign.py #1742

Closed
wants to merge 8 commits into from

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Aug 8, 2023

Description

This PR adds the ability to sign files in the naruno/lib/sign.py file. It modifies the existing sign function to check if the data parameter is a file. If it is, the function reads the file and converts it to a string before proceeding with the existing logic. This allows users to sign files without adding a new parameter, utilizing the existing data parameter.

Additionally, the verify function in the naruno/lib/verify.py file has been modified to handle file signatures. If the path parameter points to a file, the function reads the file and loads the contents as the sign_json variable. This ensures that the verify function can handle both regular signatures and file signatures.

Summary of Changes

  • Modified the sign function in naruno/lib/sign.py to handle file signatures by checking if the data parameter is a file and converting it to a string if necessary.
  • Modified the verify function in naruno/lib/verify.py to handle file signatures by reading the file contents if the path parameter points to a file.

Please review and merge this PR. Thank you!

Fixes #1729.


To checkout this PR branch, run the following command in your terminal:

git checkout sweep/sign-files_1

To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Aug 8, 2023
@sweep-ai sweep-ai bot temporarily deployed to Tests August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Tests August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to LINT Tests August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Tests August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Tests August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 8, 2023 13:30 Inactive
@github-actions github-actions bot added the Lib label Aug 8, 2023
@sweep-ai sweep-ai bot temporarily deployed to LINT Tests August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 8, 2023 13:30 Inactive
@sweep-ai sweep-ai bot temporarily deployed to FUNCTIONAL Tests August 8, 2023 14:21 Inactive
@sweep-ai sweep-ai bot temporarily deployed to UNIT Tests August 8, 2023 14:21 Inactive
@sweep-ai sweep-ai bot temporarily deployed to UNIT Tests August 8, 2023 14:23 Inactive
@sweep-ai sweep-ai bot temporarily deployed to UNIT Tests August 8, 2023 14:24 Inactive
@sweep-ai sweep-ai bot temporarily deployed to FUNCTIONAL Tests August 8, 2023 14:24 Inactive
@sweep-ai sweep-ai bot temporarily deployed to UNIT Tests August 8, 2023 14:24 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Tests August 9, 2023 12:15 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 9, 2023 12:15 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Codecov August 9, 2023 12:15 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 9, 2023 12:16 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Tests August 9, 2023 12:16 Inactive
@sweep-ai sweep-ai bot temporarily deployed to LINT Tests August 9, 2023 12:16 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 9, 2023 12:16 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 9, 2023 12:16 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 9, 2023 12:16 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 9, 2023 12:16 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 9, 2023 12:16 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 9, 2023 12:16 Inactive
@sweep-ai sweep-ai bot temporarily deployed to Builds August 9, 2023 12:16 Inactive
@sweep-ai sweep-ai bot temporarily deployed to UNIT Tests August 9, 2023 12:19 Inactive
@sweep-ai sweep-ai bot temporarily deployed to FUNCTIONAL Tests August 9, 2023 12:19 Inactive
@sweep-ai sweep-ai bot temporarily deployed to UNIT Tests August 9, 2023 12:19 Inactive
@sweep-ai sweep-ai bot temporarily deployed to UNIT Tests August 9, 2023 12:19 Inactive
@onuratakan onuratakan closed this Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lib sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep: Add ability to signing files in naruno/lib/sign.py
1 participant