summaryrefslogtreecommitdiffstats
path: root/openpgp
AgeCommit message (Collapse)Author
2020-04-16openpgp: Add version constant.Justus Winter
2020-04-16Revert "openpgp: Make PacketParserResult a std::result::Result."Justus Winter
This reverts commit 2e1eec5fe4157a391a13554ff7df3075cfe043cc.
2020-04-16openpgp: Rename field.Neal H. Walfield
- It's a bundle, not a binding.
2020-04-15openpgp: Drop Cert::primary_userid.Justus Winter
- Fixes #484.
2020-04-15openpgp: Drop Cert::primary_user_attribute.Justus Winter
- See #484.
2020-04-15openpgp: Drop Cert::alive.Justus Winter
- See #484.
2020-04-15openpgp: Drop Cert::direct_key_signature.Justus Winter
- Methods on Cert should not take a policy. Instead, the corresponding method on ValidCert should be used. - See #484.
2020-04-15openpgp: Add doctest example for PacketPile.Wiktor Kwapisiewicz
2020-04-15openpgp: Add doctests for PacketPile's public methods.Wiktor Kwapisiewicz
- Add doctest example to PacketPile. - Add doctest example to `PacketPile::path_ref`. - Add doctest example to `PacketPile::path_ref_mut`. - Add doctest example to `PacketPile::descendants`. - Add doctest example to `PacketPile::children`. - Add doctest example to `PacketPile::into_children`. - Fixes #467.
2020-04-15openpgp: Consider all self signatures for designated revokers.Justus Winter
- Fixes #478.
2020-04-15openpgp: Make test more robust.Justus Winter
2020-04-15openpgp: We don't throw away components with no self signaturesNeal H. Walfield
- We don't throw away components with no (valid) self signatures. - Add a test demonstrating this. - Correct the documentation.
2020-04-14openpgp: Fix typos.Neal H. Walfield
- Thanks to Justus and Wiktor for pointing them out.
2020-04-14openpgp: Make extending a certificates' validity more robust.Justus Winter
- To extend the primary key's validity, create a direct key signature as well as a new binding signature for every userid. - Since all new binding signatures have the same creation time, make the choice of primary userid explicit. - Fixes #479.
2020-04-11openpgp: Improve documentation of the cert moduleNeal H. Walfield
- See #466.
2020-04-11openpgp: Remove unused types.Neal H. Walfield
2020-04-10openpgp: Make cert::amalgamation::key a public moduleNeal H. Walfield
- Make `cert::amalgamation::key` a public module. - Move `cert::amalgamation::keyiter` to `cert::amalgamation::key::iter`. Have `cert::amalgamation::key` export its public symbols.
2020-04-09openpgp: Make PacketParserResult a std::result::Result.Justus Winter
- This avoids the partial implementation imitating std::option::Option, replacing it with std::result::Result. - As a benefit, std::result::Result is in the prelude, simplifying a lot of parsing loops.
2020-04-09openpgp: Remove convenience functions.Justus Winter
2020-04-09openpgp: Rename PacketParserBuilder::finalize to build.Justus Winter
- Writers should be finalized, builders should be built.
2020-04-09openpgp: Rename MAX_PACKET_SIZE and make it public.Justus Winter
2020-04-09openpgp: Rename MAX_RECURSION_DEPTH and make it public.Justus Winter
- Rename to DEFAULT_MAX_RECURSION_DEPTH to better reflect the fact that it is not a absolute maximum, but only the default. Make it public so that the documentation can refer to that.
2020-04-09openpgp: Limit publicly exposed Nettle APIIgor Matuszewski
2020-04-08openpgp: Add some type aliases.Neal H. Walfield
2020-04-08openpgp: Implement From<&Cert> for RevocationKeyNeal H. Walfield
2020-04-08openpgp: Impl TryFrom<PacketParserBuilder> for PacketPileParser.Justus Winter
2020-04-08openpgp: Replace PacketParser::decrypted with PP::encrypted.Justus Winter
- `decrypted` implies that the packet was previously encrypted. However, If we parse a signed-only message, the literal packet was never encrypted. Provide the inverse predicate instead, which is less misleading.
2020-04-08openpgp: Fix error handling.Justus Winter
2020-04-08openpgp: Move methods mapping and inspect to VerificationHelper.Justus Winter
2020-04-08openpgp: Rename Field::data to as_bytes.Justus Winter
2020-04-08openpgp: Remove convenience function.Justus Winter
2020-04-08openpgp: Restrict visibility.Justus Winter
2020-04-08openpgp: Change key's role function names.Wiktor Kwapisiewicz
- Change `mark_role_primary` to `role_into_primary`. - Change `mark_role_primary_ref` to `role_as_primary`. - Change `mark_role_subordinate` to `role_into_subordinate`. - Change `mark_role_subordinate_ref` to `role_as_subordinate`. - Change `mark_role_unspecified` to `role_into_unspecified`. - Change `mark_role_unspecified_ref` to `role_as_unspecified`. - Fixes #452.
2020-04-08openpgp: Move around some crypto pub re-exportsIgor Matuszewski
To keep it consistent with other re-exports and to easier see at a glance what is re-exported from the module.
2020-04-08openpgp: Rename crypto::mpis to crypto::mpiIgor Matuszewski
To be consistent; we don't use plural forms for modules anywhere else and Rust always uses singular forms.
2020-04-08openpgp: Correct spelling in ICAO to Alfa.Nora Widdecke
2020-04-08openpgp: Specialize stream::Message, make Cookie private.Justus Winter
- Previously, Message was polymorphic over the cookie. However, the writer stack framework only has one user, and it likely ever will, so I don't really see the point in complicating our interface.
2020-04-08openpgp: Rename Encryptor::sym_algo to symmetric_algo.Justus Winter
- This aligns it with AED::symmetric_algo and SKESK::symmetric_algo.
2020-04-07openpgp: Support setting designated revocations on new keysNeal H. Walfield
- Add CertBuilder::set_revocation_keys to add designated revokers to the certificate.
2020-04-07openpgp: Avoid unnecessarily duplicating the revocation keysNeal H. Walfield
- Change `ValidAmalgamation::revocation_keys` to avoid duplicating the revocation keys on the direct signature when there is no binding signature.
2020-04-07openpgp: Implement VerifiedCert::revocation_keysNeal H. Walfield
2020-04-07openpgp: Allow setting multiple designated revokersNeal H. Walfield
2020-04-07openpgp: Simplify some default time unwrappingIgor Matuszewski
2020-04-07openpgp: Simplify Key4::has_unencrypted_secretIgor Matuszewski
2020-04-07openpgp: Simplify for loop in AES key unwrappingIgor Matuszewski
2020-04-07openpgp: Move key related functionality to KeyAmalgamation.Neal H. Walfield
- There is no reason for `ValidComponentAmalgamation<UserAttribute>` to provide a `key_flags` method, or a `for_certification` method, etc. - It is questionable whether `ValidComponentAmalgamation<UserID>` should: it's true that the primary key's binding signature is the primary User ID's binding signature, and so when trying to determine whether the primary key is, say, signing capable, the key flags for the primary user id are needed. However, this is an implementation detail, which doesn't need to be exposed to the user; it is just confusing. - Only implement these methods for `ValidKeyAmalgamation`.
2020-04-07openpgp: Improve documentation for the serialize module.Justus Winter
- Fixes #472.
2020-04-07openpgp: Remove convenience methods that don't improve convenienceNeal H. Walfield
- Remove `ValidAmalgamation::cert_revoked` and `ValidAmalgamation::cert_alive`, which don't offer any convenience over `ValidAmalgamation::cert().revoked()` and `ValidAmalgamation::cert().alive()`.
2020-04-07openpgp: Remove redundant implementations of direct_key_signatureNeal H. Walfield
- Provide a default implementation of `ValidAmalgamation::direct_key_signature`, which is sufficient for all implementations of the trait.
2020-04-07openpgp: Add forwarders to ComponentAmalgamation.Neal H. Walfield
- Add forwarders from `ComponentAmalgamation` to `ComponentBundle` to more accurately capture the lifetime of the return values.