summaryrefslogtreecommitdiffstats
path: root/openpgp
AgeCommit message (Collapse)Author
2020-10-20openpgp: Make struct Cookie public.Justus Winter
2020-10-19openpgp: Fix documentation.Justus Winter
2020-10-19buffered-reader: Make Generic::reader private and add accessors.Justus Winter
2020-10-19openpgp: Avoid buffering.Justus Winter
2020-10-19openpgp: Make StandardPolicy::at polymorphic over time.Justus Winter
2020-10-18openpgp: Implement date formatting for WASM using chrono crateIgor Matuszewski
2020-10-18openpgp: Change Cert::into_packets to not drop any information.Neal H. Walfield
- Change `Cert::into_packets` to return the underlying packets. That is don't drop secret key material like `Cert::serialize` does.
2020-10-18openpgp: Harmonize the order that packets are serialized.Neal H. Walfield
- When serializing a `Cert`, we should emit the signatures in their order of importance: - self revocations - self signatures - certifications - other certifications - Change TSK::serialize_common to be consistent with this.
2020-10-16openpgp: Add filters for userids, user attributes, and subkeys.Justus Winter
- This covers the most common filter operations on certificates, those with a per-component granularity. - Fixes #21.
2020-10-16openpgp: Rename file.Justus Winter
2020-10-16openpgp: Fix link.Justus Winter
2020-10-16openpgp: Fix crash in SKESK::parse.Justus Winter
- Fixes #588.
2020-10-14Release 0.20.0.v0.20.0Justus Winter
2020-10-14openpgp, autocrypt: Port to base64 0.13.Justus Winter
2020-10-14buffered-reader, openpgp: Port to bzip2 0.4.Justus Winter
2020-10-14Use 'Examples' for the examples section.Justus Winter
- See #480.
2020-10-14Replace most 'extern crate' directives with 'use'.Justus Winter
- See #480.
2020-10-13openpgp: Drop obsolete comment.Justus Winter
2020-10-13openpgp: When complementing issuers, mark issuers as authenticated.Justus Winter
2020-10-13openpgp: Sort the unhashed subpacket area in Signature::normalize.Justus Winter
2020-10-13openpgp: Add issuers and sort subpackets when canonicalizing Certs.Justus Winter
- This makes sure that merging a cert with itself does not change the cert. - Fixes #579.
2020-10-13openpgp: Avoid allocation if nothing has to be done.Justus Winter
2020-10-13openpgp: Make Signature::add_missing_issuers public.Justus Winter
2020-10-13openpgp: Use the more idiomatic contains function to search issuers.Justus Winter
2020-10-13openpgp: Unbox the slice containing secrets.Justus Winter
- Previously, we stored secrets as boxed slices. However, with Rust managing the allocation using a smart pointer, we are worried about potential optimizations. For example, Rust could conceivably compact the heap: The borrow checker knows when no references exist, and this is an excellent opportunity to move the object on the heap because only one pointer needs to be updated. - Avoid this by unboxing the slice storing a raw pointer to the slice. - Fixes #577.
2020-10-13openpgp: Make Protected's methods not depend on the implementation.Justus Winter
2020-10-13openpgp: Explicitly implement Clone for Protected.Justus Winter
2020-10-13openpgp: Avoid possible reallocations in From::<Vec<u8>>.Justus Winter
2020-10-09openpgp: Fix setting a primary key's validity period.Neal H. Walfield
- When setting a primary key's validity period, we create a direct key signature. - If there is no direct key signature, then we use the primary User ID's binding signature. - In this case, we need to change the signature type. - Also filter out subpackets that shouldn't be set on a direct key signature.
2020-10-09openpgp: Allow HashSet with mutable key type.Nora Widdecke
- Closes #578. - Generally, types used as keys of HashSets should not have interior mutability. We believe this case to be safe, however. - https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type
2020-10-09openpgp: Make Recipient::set_keyid easier to use.Justus Winter
2020-10-09openpgp: Don't rely on associate constants.Justus Winter
- Makes the crate compile with 1.39.
2020-10-08openpgp: Warn about possible reallocation in mem::ProtectedIgor Matuszewski
2020-10-08openpgp: Don't mark memory-safe Protected::into_vec as unsafeIgor Matuszewski
In general, `unsafe` is an escape hatch for when do we suspicious but actually memory-safe fiddling that the compiler can't understand. Copying the secret into a raw `Vec` may be risky from the security point of view but is not `unsafe` in the sense above. Use established practice of using long/unwieldy names for functions that need careful thought.
2020-10-08openpgp: Don't use Pin for Box-allocated secretsIgor Matuszewski
The pointed-to buffer is already immovable and *pinned* by `Box<[u8]>`. Moving `Box` value itself only moves the pointer and does not involve moving the backing storage.
2020-10-07autocrypt, openpgp: Unpin base64.Nora Widdecke
2020-10-07openpgp: Unpin dependency dyn-clone.Nora Widdecke
2020-10-07openpgp: Improve cert canonicalization corner case.Justus Winter
- If a signature has no issuer information, assume it is a self-signature. If it is not, then there is no way to know who made the signature.
2020-10-07openpgp: Align MPI parsing functions with trait Parse.Justus Winter
- Change mpi::*::parse to take a Reader instead of a AsRef<u8>. The former is a more general interface.
2020-10-07openpgp: Use correct checksum method when parsing encrypted keys.Justus Winter
- Fixes e980facce477e7bbe5de5d5e970124a9203c0004.
2020-10-06openpgp: Remove one unreachable thanks to newer match exhaustive checksIgor Matuszewski
2020-10-06Remove top-level sequoia packageIgor Matuszewski
This runs into surprising interactions when trying to build member packages with other than default feature set. See https://gitlab.com/sequoia-pgp/sequoia/-/issues/575 for more info.
2020-10-06Don't use OS-specific extensions from memsecIgor Matuszewski
We only ever use {memset, memzero, memeq, memcmp} anyway - don't pull OS-specific functions like mlock.
2020-10-06Bump memsec to 0.6Igor Matuszewski
2020-10-06openpgp: Support encrypted keys protected by two octet sum.Justus Winter
- Encrypted key material can be protected by either SHA1 or a two octet sum over the key material. The latter is not used anymore, but GnuPG 2.1 emits this S2K usage octet when emitting TSKs with detached keys. - Fixes #569.
2020-10-06openpgp: Use common SecretKeyMaterial::parse_with_checksum.Justus Winter
2020-10-06openpgp: Move checksum processing to SecretKeyMaterial::_parse.Justus Winter
2020-10-06openpgp: Use common mpi::SecretKeyMaterial::serialize_with_checksum.Justus Winter
2020-10-06openpgp: Avoid compile-time polymorphism.Justus Winter
2020-10-06openpgp: Implement two-octet checksums over secret key material.Justus Winter
- Also, rename methods to be more explicit.