fn signed_public_key_from_dir(
path: impl AsRef<Path>,
) -> Result<SignedPublicKey, Error>Expand description
Creates a single [SignedPublicKey] from regular files in a directory.
First collects the paths of all regular files in path.
Then parses each regular file as a single OpenPGP packet.
Finally, reads a single OpenPGP certificate from the packets.
ยงErrors
Returns an error if
- recursively collecting regular files from
pathfails, - parsing a single OpenPGP packet from each collected regular file fails,
- no [
SignedPublicKey] can be created from the OpenPGP packets, - creating a [
SignedPublicKey] from the OpenPGP packets fails, - an additional, unwanted [
SignedPublicKey] is created from the OpenPGP packets, - or creating an additional, unwanted [
SignedPublicKey] from the OpenPGP packets fails.