trussed-dev / trussed

Modern Cryptographic Firmware
https://trussed.dev
Apache License 2.0
405 stars 26 forks source link

read_dir_first: stop at the first file that is alphabetically "after" `not_before` #151

Closed sosthene-nitrokey closed 5 months ago

sosthene-nitrokey commented 6 months ago

In fido-authenticator, if we change the paths of RK to be: "rp_id.rk_id" instead of the current "rp_id/rk_id", we still want to be able to iterate over the keys even though we only know the "rp_id" and not the "rk_id". Therefore we need to be able to stop at "rp_id.***" when giving "rp_id" in not_before

This is technically a breaking change because now, given the files:

I beleive this behaviour is technically more correct as it is likely what would be expected to be yield expecting alphabetical order (though the order of the entries is still incorrect).