Skip to content

SSlibKey: consider stronger validation of keytype/scheme for keyval  #766

Open
@lukpueh

Description

The consistency of SSlibKey instances is mainly "validated" at usage time. That is, in SSlibKey.verify_signature, when keyval is deserialised based on scheme, unknown schemes and undeserializable keyvals are filtered out. This validation is incomplete and also happens late.

For comparison, at creation time inputs are hardly validated (see e.g. in from_dict or in the base constructor). Note that an additional safeguard exists in the Key.from_dict deserialisation interface, which filters out unregistered keytype, scheme pairs.

Let's consider:

  • adding more comprehensive validation, most notably check consistency of keytype, scheme, and keyval, and
  • validating earlier, e.g. already in the constructor

See related issues related to invalid SSlibKey instances and validation: #764 #765, #669, #559

Metadata

Assignees

No one assigned

    Labels

    discussionIssues that require discussion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions