From: Tobias D. <no...@gi...> - 2025-07-16 17:03:38
|
Branch: refs/heads/master Home: https://github.com/OpenSC/libp11 Commit: 0a203fee34f2ce84ac8f68bb331f93fcf7760246 https://github.com/OpenSC/libp11/commit/0a203fee34f2ce84ac8f68bb331f93fcf7760246 Author: Tobias Deiminger <tob...@li...> Date: 2025-07-16 (Wed, 16 Jul 2025) Changed paths: M src/util_uri.c Log Message: ----------- Skip trailing newlines in pin-source files Text editors usually append '\n' to the last line when saving a text file. Also 'echo "mypin" > ~/pinfile.txt' appends a newline. It's therefore likely we encounter PIN files where the PIN is delimited with '\n'. Currently, PIN validation would fail in such a case since libp11 passes on the newline to PKCS#11 modules as if it was part of the PIN. We now ignore trailing newlines. There's no specification mandating this, but since PINs are meant for interactive input it seems safe to assume PINs will never be allowed to contain a trailing newline. Further, the pkcs11-provider project is doing the same in their src/util.c:get_pin_file. The change is backwards compatible. PIN files without trailing newline will work as well. Commit: 5c3fa23d35721eb0bd98265bfc5d759fc1744fc3 https://github.com/OpenSC/libp11/commit/5c3fa23d35721eb0bd98265bfc5d759fc1744fc3 Author: Tobias Deiminger <tob...@li...> Date: 2025-07-16 (Wed, 16 Jul 2025) Changed paths: M tests/Makefile.am A tests/pkcs11-uri-pin-source.softhsm Log Message: ----------- Add tests dedicated to pin-source Compare: https://github.com/OpenSC/libp11/compare/8b89cad3641c...5c3fa23d3572 To unsubscribe from these emails, change your notification settings at https://github.com/OpenSC/libp11/settings/notifications |