summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2019-02-06openpgp: Remove the armored! macro.Justus Winter
- The packet parser now digests armored data, so there is no need to use this even in examples or tests, just use the appropriate .from_bytes(..) function. - Fixes #169.
2018-11-24Rename the openpgp crate to sequoia-openpgp.Justus Winter
2018-05-02Simplify example.Justus Winter
2018-01-24Add an example to the toplevel crate.Justus Winter
- We should replace this with a more comprehensive example covering the other crates too.
2018-01-03Remove the 'sequoia' binary.Justus Winter
2017-12-19Improve the 'sequoia' crate.Justus Winter
- Improve the documentation. - Re-export 'openpgp'. - Re-export the other crates without prefix.
2017-12-13Split up Sequoia.Justus Winter
- Split up into six crates: buffered-reader, openpgp, sequoia-core, sequoia-ffi, sequoia-net, and sequoia-store. - Adjust imports accordingly.
2017-12-13Rework the way we locate test data.Justus Winter
2017-12-13Make all packet fields public.Justus Winter
- We do not want to use getters and setters for now. Maintaining them is annoying while our interface is still young. - We will not expose this to the ffi api.
2017-12-13Rename and move keys module to openpgp::tpk.Justus Winter
2017-12-13Rework the keys module.Justus Winter
- Add a new field 'primary' for the primary key. - Improve error handling. - Actually do a little canonicalization. - Improve and document ffi glue.
2017-12-13Move the ASCII Armor module to 'sequoia::openpgp'.Justus Winter
2017-12-13Don't store the packet tag in PacketCommon.Neal H. Walfield
- Given a `Packet`, the packet tag is unambiguous in all cases except for unknown packets. As such, don't store the tag in PacketCommon; only store it when it is actually needed.
2017-12-12Add initial support for signature subpackets.Neal H. Walfield
2017-12-12Fix formatting and improve documentation.Justus Winter
2017-12-12Fix sample code.Justus Winter
- Fixes 1d87c32b9536fd49b65a11364d882edb115650aa.
2017-12-12Add missing file from last commit.Neal H. Walfield
2017-12-12Hard limit OpenPGP packet recursion to 255 levels.Neal H. Walfield
- Reading from the pipeline is a recursive operation (when reading from a reader, the reader calls the underlying reader, etc.). It is probably possible to refactor this to be iterative, but the cost is too high when in practice more than 16 levels of recursion is almost certainly an error, and for 16 levels, there is more than enough headroom (I blow the stack for >512 levels of recursion on 64-bit Linux).
2017-12-12Clean up the buffered_reader's exports.Neal H. Walfield
2017-12-12Retrieve and send keys using the hkps? protocol.Justus Winter
- Use hyper for http, hyper-tls for https. - Provide an easy constructor for the hkps pool. - Add ffi glue.
2017-12-12Split BufferedReader implementations into separate files.Neal H. Walfield
- Break buffered_reader.rs into several files, one per implementation. - Rename the other implementations to remove the 'buffered_reader_' prefix from the filename.
2017-12-12Make the BufferedReader a (private) top-level module.Neal H. Walfield
2017-12-11Remove the unused Deref implementations for the OpenPGP packetsNeal H. Walfield
2017-12-11Remove some redundant code.Neal H. Walfield
2017-12-11If a compression packet is unsupported, treat it as a unknown packetNeal H. Walfield
- Instead of erroring out for unknown compression algorithms, treat compression packets with an algorithms as unknown packets.
2017-12-11Add a custom Debug implementation for PacketCommon.Neal H. Walfield
- When a packet contained data, the output was much too verbose. Now, we only print whether there is data and the amount of data that we have.
2017-12-11Add an "unknown" packet.Neal H. Walfield
- If a packet is unsupported, instead of failing, we create a special unknown packet.
2017-12-11Don't forget to wrap the reader when creating a container.Neal H. Walfield
- Our convention is that a container wraps the provided reader. Also do this when dealing with a compressed packet that is uncompressed.
2017-12-11Rework the parser interface and implementation to support streamingNeal H. Walfield
- Our goal is to gradually parse messages so that it is possible to work with messages that don't fit in the available memory. The current implementation parsed the messages in their entirety using recursion. To provide to a generator interface, we need to be much more careful with lifetimes. This requires changing the interface. - Change the `BufferedReader` objects to own any encapsulated `BufferedReader`s rather than just holding a reference. This is necessary so the generator can keep a stack of filters. - Provide new decompressor implementations so that it is possible to extract the contained `BufferedReader`. - Use vectors instead of boxes slices to hold raw byte strings. - Store a packet's contents (either any children or the raw data) in the common area. Also provide a DerefMut implementation to access it. - Make packets comparable (PartialEq) and printable (Debug).
2017-12-08Rework the context.Justus Winter
- Create default context with 'Context::new', create builder with 'Context::configure'. - Rename 'Pre' to 'Config'. - Expose builder to ffi.
2017-12-08Fix example.Justus Winter
2017-12-07Add types for working with OpenPGP.Justus Winter
- Add KeyId to identify keys.
2017-12-06Add 'domain' to the context.Justus Winter
- The domain uniquely identifies the application. It should be a property of the context.
2017-12-04Rename 'key_store' to 'store'.Justus Winter
2017-12-01Create context objects.Justus Winter
- Context objects can be used to tweak the library configuration. Currently, a home and lib directory can be set. Reasonable defaults are provided. - Add ffi functions.
2017-11-28Implement autodetection of type when reading armored data.Justus Winter
- Add 'Kind::Any' that can be used with the reader. - Add a function to inspect the detected type.
2017-11-28Make the buffered reader module public.Justus Winter
2017-11-28Fix out-of-bounds access.Justus Winter
- Fix filling the stash when buffers of size one are passed to 'write'. - Add a test demonstrating the problem.
2017-11-28Return the correct number of bytes written.Justus Winter
- Return the number of unencoded bytes written. Assert that the return value is sane. - Improve the test so that it demonstrates the problem.
2017-11-28Fix corner case.Justus Winter
- When armoring data of size zero, make sure that the header is written even if 'write' is never called.
2017-11-27Fix the size of the stash.Justus Winter
- Base64 encodes three bytes in four. We stash unencoded bytes, therefore we need to stash at most two bytes. Assert that in interesting places. - Reverse the items in the stash directly after populating it. This is is less surprising for the reader.
2017-11-27Implement reading ASCII Armored files.Justus Winter
2017-11-24Implement writing ASCII Armored files.Justus Winter
2017-11-23Add a foreign function interface.Justus Winter
- For now, we keep the ffi in this crate, later on we may want to move it to sequoia-ffi. - Example code how to use the library from C is added as well.
2017-11-22Serialize TPKs into OpenPGP messages.Justus Winter
2017-11-22Add a constructor to create messages from packets.Justus Winter
2017-11-22Assemble transferable public keys from messages.Justus Winter
- For now, no canonicalization is done. For that to happen we need to be able to access the packets fields, which are not public and there is no accessor.
2017-11-22Add an destructive iterator.Justus Winter
- Implement IntoIter that deconstucts the message objects and moves packages out of it.
2017-11-22Add convenience function to parse bytes.Justus Winter
- Given some bytes, return an OpenPGP message object.
2017-11-22Add convenience function to parse files.Justus Winter
- Given a file, return an OpenPGP message object.