Skip to content

Commit

Permalink
set default checksum type to sha256
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverkurth committed Dec 18, 2023
1 parent e9672f9 commit c775eb3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ Options:
* `ovf` to create just the OVF file
* `dir` to create a directory containing the OVF file, the manifest and the files used for the cdrom and harddisk devices.
* `--param <key=value>`: set parameter `<key>` to `<value>`.

* `--param <key=value>`: set parameter `<key>` to `<value>`
* `--checksum-type sha256|sha512`: the checksum type used for the manifest file. The default is `sha256`.

Example:
```
$ ova-compose.py -i minimal.yaml -o minimal.ova
Expand Down
2 changes: 1 addition & 1 deletion ova-compose/ova-compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ def main():
do_quiet = False
do_manifest = False
params = {}
checksum_type = "sha512"
checksum_type = "sha256"

try:
opts, args = getopt.getopt(sys.argv[1:], 'f:hi:mo:q', longopts=['format=', 'input-file=', 'manifest', 'output-file=', 'param=', 'checksum-type='])
Expand Down
4 changes: 2 additions & 2 deletions pytest/test_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_ovf_manifest(hash_type):
if hash_type is not None:
args += ["--checksum-type", hash_type]
else:
hash_type = "sha512"
hash_type = "sha256"

process = subprocess.run(args, cwd=WORK_DIR)
assert process.returncode == 0
Expand All @@ -93,7 +93,7 @@ def test_ova_manifest(hash_type):
if hash_type is not None:
args += ["--checksum-type", hash_type]
else:
hash_type = "sha512"
hash_type = "sha256"

process = subprocess.run(args, cwd=WORK_DIR)
assert process.returncode == 0
Expand Down

0 comments on commit c775eb3

Please sign in to comment.