Skip to content

Sign function incorrectly strips one trailing CRLF #286

@Avamander

Description

@Avamander

When trying to generate a valid signature according to RFC3156 I stumbled upon the fact that the last \r\n of the bytes given to sign are stripped.

Example:

text = "example text\r\n".encode()
signature = sign(text)
assert verify(signature, text) == True

> AssertionError

Workaround:

text = "example text\r\n".encode()
signature = sign(text + "\r\n".encode())
assert verify(signature, text) == True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions