File-signing password input used a fixed 64-byte fgets() buffer and
unconditionally removed its final byte. Passwords that filled the buffer
therefore lost a real character, while longer passwords were silently
truncated and could not unlock their key.

Read the complete line with getline() and remove the trailing newline only
when one is present. Add an IMA signing regression test using an encrypted
key with a password longer than the old buffer, and install the
pseudo-terminal helper required by the Fedora test image.

Signed-off-by: Daan De Meyer <[email protected]>

You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/4281

-- Commit Summary --

  * Fix long file-signing password input

-- File Changes --

    M tests/Dockerfile.fedora (1)
    M tests/rpmsigdig.at (14)
    M tools/rpmsign.cc (16)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/4281.patch
https://github.com/rpm-software-management/rpm/pull/4281.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4281
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/[email protected]>
_______________________________________________
Rpm-maint mailing list
[email protected]
https://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to