Skip to content

Conversion from FileDecryptionProperties to ConfigFileDecryptionProperties should be fallible #21602

@adamreeve

Description

@adamreeve

The ConfigFileDecryptionProperties type implements From<&Arc<FileDecryptionProperties>>

But ConfigFileDecryptionProperties is unable to represent decryption properties that use a key retriever to dynamically retrieve keys. If the FileDecryptionProperties uses a key retriever, trying to get the footer key will fail and a default empty key will be silently used:

f.footer_key(None).unwrap_or_default().as_ref(),

This can lead to unexpected behaviour and hard to track down bugs.

We should instead implement TryFrom so it's clear that this can fail, and return a helpful error on failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions