Skip to content

Improve handling for "no roots in server config" #217

@jsha

Description

@jsha

Right now, if you call rustls_server_config_builder_build on a config builder where no cert resolver has been set, it will return NULL. This is a little inconsistent with other functions, where returning NULL is reserved for panics or null inputs.

Instead we should do one of two things:

  • Make cert resolver a mandatory argument to rustls_server_config_builder_new and rustls_server_config_builder_new_custom, or
  • Make rustls_server_config_builder_build() take an output parameter to write the built server config, and return a rustls_result, which may return a new error value RUSTLS_RESULT_NO_CERT_RESOLVER.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions