summaryrefslogtreecommitdiffstats
path: root/openpgp/examples
AgeCommit message (Collapse)Author
2020-02-06openpgp: Rename methods 'set_policy' to 'with_policy'.Justus Winter
- Fixes #427.
2020-02-06openpgp, openpgp-ffi, ipc: Add missing dyn.Justus Winter
2020-02-06openpgp: Rename ComponentBinding to ComponentBundle, etc.Justus Winter
- Likewise KeyBinding, UserIDBinding, UserAttributeBinding, UnknownBinding, etc. - Reason: a self-signature on a component is a binding, but revocations and TPSes are not bindings. - Consistently call collections of components and associated signatures bundles now. Likewise for fields, methods. - Fixes #425.
2020-01-31openpgp: Add a policy object.Neal H. Walfield
- Change all functions that need to evaluate the validity of a signature (either directly or indirectly to take a policy object. - Use the policy object to allow the user to place additional constraints on a signature's validity. - This addresses the first half of #274 (it introduces the policy object, but does not yet implement any policy).
2020-01-20openpgp: Rename ComponentIter::components to bindings.Neal H. Walfield
- `ComponentIter::components` returns `ComponentBindings`. It is more accurate to call it `ComponentIter::component_bindings`. But, since it is called on a component, just use the shorter name, `ComponentIter::bindings`.
2020-01-20openpgp: Use the new framework for Cert::userid.Justus Winter
- Fixes #414.
2020-01-18openpgp: Use Cert::keys instead of Cert::subkeys.Justus Winter
2020-01-16openpgp: Remove variant VerificationResult::BadChecksum.Justus Winter
- This is better expressed as an error.
2020-01-14openpgp: Remove unneeded fields from VerificationResult::NotAlive.Neal H. Walfield
- VerificationResult::NotAlive means that the signature is not alive. This has nothing to do with a specific key. Indeed, there might not even be a key available, but we can still detect this error condition. - As such, remove the cert and key fields from VerificationResult::NotAlive.
2020-01-13openpgp: Add Error variant to VerificationResult.Neal H. Walfield
- Add an Error variant to VerificationResult.
2020-01-10openpgp: Prefer consuming MessageStructure's to referencing them.Neal H. Walfield
2020-01-10openpgp: Pass MessageStructure by value, not reference.Neal H. Walfield
- Instead of passing MessageStructure to VerificationHelper::check by reference, pass it by value. - After calling VerificationHelper::check, it is dropped. Passing it by value allows the caller to avoid some cloning.
2020-01-06openpgp: Use KeyAmalgamation::for_xxx instead of building a KeyFlagsNeal H. Walfield
- Use the convenient functions KeyAmalgamation::for_storage_encryption, KeyAmalgamation::for_transport_encryption, etc., instead of building up a KeyFlags and then calling KeyAmalgamation::key_flags. - This pattern requires less boilerplate.
2020-01-06openpgp: Pass a timestamp to the KeyIter instead of each filter.Neal H. Walfield
- KeyIter::revoked and KeyIter::key_flags (and its variants) didn't take a time stamp so they could only be used for filtering keys based on their current state, not their state at some time in the past. Adding a time stamp to each of the filters would have fixed the problem, but it would have made the interface ugly: callers always want the same time stamp for all filters. - Split KeyIter into two structures: a KeyIter and a ValidKeyIter. - Add KeyIter::policy. It takes a time stamp, which is then used for filters like `alive` and `revoked`, and it returns a ValidKeyIter, which exposes filters that require a time stamp.
2020-01-04openpgp: Change KeyIter::key_flags to not require an owned KeyFlags.Neal H. Walfield
- Instead of taking a `KeyFlags`, change `KeyIter::key_flags` to take a `Borrow<KeyFlags>`. - Update callers to pass a reference instead of cloning.
2020-01-02openpgp: Change SubpacketValue::Unknown to store the tag.Justus Winter
- Makes it possible to construct unknown packets with arbitrary subpacket tags. - Fixes a regression.
2019-12-20openpgp: Simplify key iteration interface.Neal H. Walfield
- Cert::keys_valid() is just a short-cut for Cert::keys_all().alive().revoked(false). - Remove Cert::keys_valid() and rename Cert::keys_all() to Cert::keys().
2019-12-19openpgp: Change KeyIter to return a struct instead of a tuple.Neal H. Walfield
- A tuple is just an unnamed, inflexible struct. Use a struct instead. - Fixes #400.
2019-12-17openpgp: Make Subpacket own the data.Justus Winter
- The subpacket areas now have a vector of subpackets. Change some accessors here and there to accommodate this. - This requires bit-perfect roundtripping of subpackets so that signatures are not invalidated. - First step towards fixing #200.
2019-12-06openpgp: Count first party vs third party signatures.Justus Winter
2019-12-05openpgp: Make crypto::{Signer,Decryptor} non-polymorphic.Justus Winter
- These are low-level cryptographic traits that are not concerned with the role of a key. - Fixes #382.
2019-12-04openpgp: Refine CertBuilder::add_encryption_subkey.Justus Winter
2019-12-04openpgp: Improve example.Justus Winter
2019-12-04openpgp: Rename KeyFlag's accessors.Justus Winter
- Fixes #359.
2019-12-04openpgp: Rename KeyIter filters.Justus Winter
- See #359.
2019-11-28Call TPKs Certificates, update identifiers, documentation.Justus Winter
- Fixes #387.
2019-11-27openpgp: Fix issuer handling in the streaming verifier.Justus Winter
- To that end, make VerificationHelper::get_public_keys take KeyHandles for all the issuers.
2019-11-27openpgp: Fix Signature::get_issuer to return set of issuers.Justus Winter
- A signature can contain multiple hints as to who created the signature. Return all those hints to the caller. - Adapt all callers accordingly. - Fixes #264.
2019-11-27openpgp: Make variants of VerificationResult struct-like, add infos.Justus Winter
2019-11-25openpgp: Specialize key iterator to return Key<SecretParts, _>.Justus Winter
- Once KeyIter::secret or KeyIter::unencrypted_secret is called, change the iterator type to iterate over &Key<SecretParts, _>. - Fixes #384.
2019-11-25openpgp: Rename openpgp::constants to openpgp::types.Justus Winter
- Fixes #381.
2019-11-22openpgp: Make conversions into Key<SecretParts, _> fallible.Justus Winter
- Fixes #380.
2019-11-20openpgp: Use the builder pattern for stream::Encryptor.Justus Winter
- Fixes #375.
2019-11-19openpgp: Use the builder pattern for stream::LiteralWriter.Justus Winter
- See #375.
2019-11-19openpgp: Use the builder pattern for stream::Signer.Justus Winter
- See #375.
2019-11-10openpgp: Distinguish bad signatures from those that are not alive.Neal H. Walfield
- Return a different `VerificationResult` for signatures that are not alive (BadSignature) from signatures that are actually bad (BadCheck).
2019-11-05openpgp: Make fields of SubpacketValue private.Justus Winter
2019-09-29openpgp: Collect statistics about regular expressions.Justus Winter
2019-09-29openpgp: Collect statistics about exportable certs.Justus Winter
2019-09-29openpgp: Collect statistics on algorithm preferences.Justus Winter
2019-09-29openpgp: Collect KeyFlags statistics.Justus Winter
2019-09-29openpgp: Add per-signature subpacket statistics.Justus Winter
2019-09-29openpgp: Collect per-TPK subpacket statistics.Justus Winter
2019-09-27linting: Clear up bare trait object warningsDaniel Silverstone
Newer Rust compilers requre `dyn` marking trait objects. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-09-27openpgp: Clean up deprecated range syntaxDaniel Silverstone
The `...` syntax is deprecated in favour of `..=` since 1.26 and is an idiom lint in the 2018 edition. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-09-11openpgp: Move packet::KeyFlags to constants.Justus Winter
2019-09-11openpgp: Move packet::BodyLength to packet::header.Justus Winter
- Move the parser to the parse module.
2019-09-10openpgp: Make fields of packet::Header private.Justus Winter
2019-09-10openpgp: Make 'LiteralWriter::new's arguments optional.Justus Winter
2019-09-06openpgp: Rework streaming encryptor.Justus Winter
- Instead of giving a set of TPKs to the encryptor, hand in a set of recipients, which are (keyid, key)-tuples, conveniently created from key queries over TPKs. This simplifies the encryptor, and makes the key selection explicit. - Drop the EncryptionMode type. - As a nice side effect, we can now generate encrypted messages with wildcard recipient addresses.