Skip to content

Ghostbusters record UTF-8 check depends on non-standard C.UTF-8 locale #41

@rhansen

Description

@rhansen

check_ghostbusters_content() in lib/rpki/cms/roa_validate.c checks to see if the Ghostbusters payload is valid UTF-8 by temporarily switching the locale character type to C.UTF-8. This locale is non-standard and does not exist on all systems, so RPSTIR skips the check if that locale is not available. This causes the badGBRNotVCard.gbr conformance test case to fail on such systems.

There is a simple MIT-licensed UTF-8 parsing library available, but it does not come with a character property database (e.g., to tell if a character is whitespace). ICU is a more full-featured unicode library.

Note that the badGBRNotVCard.gbr test does not comprehensively test whether the RP accepts Ghostbusters records with non-vCard payloads. The payload in that test is simply non-UTF-8 garbage; RPSTIR rejects non-UTF-8 payloads on systems with a C.UTF-8 locale, but does not reject payloads with valid UTF-8 data even if that payload is not a valid vCard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions