Skip to content

Why is global-context-less-secure a feature? #713

Open
@Kixunil

Description

@Kixunil

It's supposedly used to solve the situation when rand panics. However IIUC this panic really comes from getrandom always returning a failure. This should never happen unless the OS is broken (then panicking might be appropriate) or someone used the custom feature of getrandom and implemented the feature incorrectly.

But even if it's justifiable to have this on some super exotic architectures (which ones?) it looks like it should be a cfg rather than feature. It being feature causes cargo test --all-features to not test rerandomization which is weird. We could also use RngCore::try_fill_bytes and just ignore the errors during rerandomization, so the cfg wouldn't be needed (unless people need it for performance).

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.0Issues and PRs required or helping to stabilize the API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions