Skip to content

[bug] file streaming broken by cryptocodec #969

@hulto

Description

@hulto

Describe the bug
When using assets.copy the imix agents throws the following error:

Error decrypting response: aead::Error

With a tome result of:

    error: receiving on a closed channel

This seems to be an issue where the agent isn't pulling all bytes into the unmarshall function likely a chunking mechanism.

The cipher-text recivede by the client is shorter than that sent by the server.
8KiB
Image

Server sends 1MiB
Image

Tome causing the error:

def main():
    assets.copy('debug_test/assets/bash', '/tmp/bash-test')
    if not file.exists('/tmp/bash-test'):
        eprint("Asset copy failed")
        return
    if "bc5945feb8bd26203ebfafea5ce1878bb2e32cb8fb50ab7ae395cfb1e1aaaef1" != crypto.hash_file("/tmp/bash-test", "sha256"):
        eprint("Asset hash mismatch")
        return
    print("Ok!")

main()

debug_test/assets/bash Is a copy of the bash binary as an example of something large to copy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions