summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-01-18store: Use time::Timespec and fix stats.Justus Winter
- Use time::Timespec instead of std::time::SystemTime in the API. - Record timestamps of encryptions and verifications. - Adapt the tool.
2018-01-18store,tool: Improve logging framework.Justus Winter
- Move store::backend to its own directory, so that we can put the store::backend::log module in its own file. - Implement iterators for retrieving log messages related to stores, bindings, and keys. - Use loose coupling of logs and other entities, so that we can delete either without worrying about the other. - Add commands to the tool to retrieve logs.
2018-01-18store: Fix binding creation.Justus Winter
- Do not silently ignore conflicts when adding bindings. - Create BindingServer::lookup_or_create that handles the database interaction. - Rename KeyServer::lookup to KeyServer::lookup_or_create.
2018-01-18net: Improve error reporting.Justus Winter
- Error handling when starting either server or process is tricky. This patch at least displays errors when spawning a thread like we do when spawning a process.
2018-01-17store: Periodically update keys from the network.Justus Winter
- Update all keys stored in a store with network policy 'encrypted' and 'insecure' periodically using the SKS keyserver pool. - Slightly amend the net::ipc interface so that servers can spawn futures on the reactor. - As a background service cannot directly communicate failures, this patch adds a logging mechanism. - In sq, display the key update timestamp, and the status of the last update.
2018-01-17store: Make sure tests use the offline network policy.Justus Winter
- Otherwise, the key stores may try to update keys from the network.
2018-01-17store: Improve computing binding and key stats.Justus Winter
- Make the trait more general and easier to implement. - Rename compute_stats to query stats and turn it into a method of the Query trait.
2018-01-17openpgp: Add parsing and serialization support for SK-ESK packets.Neal H. Walfield
- This also adds s2k support.
2018-01-17openpgp: Make Signature::hash_init an independent function.Neal H. Walfield
- Turn `Signature::hash_init` into `hash_context`: it is useful in other contexts.
2018-01-17openpgp: Make packet parsing functions public.Neal H. Walfield
2018-01-16store: Improve key lookup.Justus Winter
- Rename get_key_id to lookup and make it a method of Keyserver. - Avoid failures on concurrent accesses.
2018-01-16store: Improve timestamp handling.Justus Winter
- Introduce a type Timestamp that wraps SystemTime, but can be serialized into the database.
2018-01-15openpgp: Reify the signature subpacket area.Neal H. Walfield
2018-01-15openpgp: Add KeyID::new to convert a u64 to a KeyID.Neal H. Walfield
2018-01-15ffi,net: Update last users of KeyId to use KeyID.Justus Winter
2018-01-15ffi: Delete compiled examples.Justus Winter
- These were checked in by accident.
2018-01-14openpgp: Remove the openpgp/types moduleNeal H. Walfield
- It only contains a KeyId type which is redundant relative to KeyID and it is buggy (e.g., when it converts a Key ID to hex, it drops any leading zeros). - Update users to use KeyID instead.
2018-01-14openpgp: Implement hashing.Neal H. Walfield
- Switch to using nettle for low-level hash functionality. - Add functionality for hasing UserID, UserAttribute, Key and Signature packets. - Add functionliaty to compute the hashes for primary key bindings, subkey bindings, user id bindings and user attribute bindings.
2018-01-14openpgp: Improve subpacket parsing.Neal H. Walfield
- Improve the internal subpacket parsing mechanism. - Add support for the remaining subpackets defined in RFC 4880. - Improve documentation. - Add much more thorough unit tests.
2018-01-14openpgp: Add a function to instantiate a KeyID from a hex string.Neal H. Walfield
2018-01-11store: Implement iteration over stores, bindings, and keys.Justus Winter
- Also add corresponding commands to the tool.
2018-01-11store: Rework database initialization.Justus Winter
- Previously, the database was initialized when a store was opened. Initialize it at the server start instead.
2018-01-11store: Rework reactor core and db connection sharing.Justus Winter
- The client side of the RPC code hides the asynchronous nature of the RPC library by sharing a common reactor. Previously, every stub object kept a reference to the store. This, however, means that every stub object must be created from a store. To provide a rich iteration interface, we need to make this more flexible. - On the server side it turns out that we do not need a mutable reference to the database connection. Therefore, we can simply drop the use of RefCell.
2018-01-11store: Improve comments.Justus Winter
- Write proper documentation for fail! and sry!.
2018-01-10store: Implement store and binding deletion.Justus Winter
- Also add commands in the tool.
2018-01-10store: Do not require mutable references to the store.Justus Winter
- The only mutable reference that we need is to the reactor core, which we store in a RefCell anyway. Requiring mutable references makes using the store very awkward, because the borrow checker works on lexical scopes, not dynamic scopes.
2018-01-10store: Improve error handling.Justus Winter
- Map errors in the backend to 'node::Error', then convert from 'node::Error' in the frontend. No need to pollute the frontend error type with errors from the backend. - Instead of mapping SqlErrors like QueryReturnedNoRows everywhere, do it once.
2018-01-10store: Make context in test ephemeral.Justus Winter
2018-01-10store: Rename field.Justus Winter
- Rename 'store_id' to just 'id' to make it consistent with the other servers.
2018-01-10net: Fix a race condition.Justus Winter
- Previously, the TcpListener 'l' that is handed to the child process via conversion to a raw filedescriptor was closed when being dropped. This lead to a small chance of closing the next TcpListener, resulting in spurious failures when falling back to the in-process server.
2018-01-10openpgp: Add accessor methods to TPKs.Neal H. Walfield
2018-01-10openpgp: Add support for User Attribute packetsNeal H. Walfield
2018-01-10openpgp: Tag::to_numeric shouldn't be a static method.Neal H. Walfield
- There is no reason for Tag::to_numeric to be a static method.
2018-01-10openpgp: Only parse v4 packets.Neal H. Walfield
- We don't support version 3 packets (or any other version but version 4). If we encounter a non-v4 key or non-v4 signature, return an Unknown packet instead. - Use Unknown::parse to return unknown packets.
2018-01-09store: Disable documentation for the 'keystore' binary.Justus Winter
- It is not intended to be used directly, no need to clutter the documentation with it.
2018-01-09tool: Add key store commands.Justus Winter
- Add commands to add, import, export keys, and to get binding and key stats.
2018-01-09store: Return the correct error when a binding is not found.Justus Winter
- Also add a test for that.
2018-01-09store: Add label to 'store::Binding' and implement 'fmt::Debug'.Justus Winter
- Save the label. We need this to reopen the label. - Implement 'fmt::Debug' so that we can use 'assert_match'.
2018-01-09store: Fix conflict detection.Justus Winter
- Detect conflicts when no key is present in the database. - Add comments.
2018-01-09store: Rename the 'node::new' rpc to 'node::open'.Justus Winter
- This aligns the name with the name of the function.
2018-01-09store: Remove 'home' from the 'Node::new' rpc.Justus Winter
- This is no longer needed as the home is communicated via command line argument.
2018-01-09store: Improve database schema.Justus Winter
2018-01-09store: Improve error handling.Justus Winter
- Errors need to be serialized and deserialized when using RPCs. This is a bit lossy and needs some more work.
2018-01-09store: Use and honor the network policy.Justus Winter
- Save the network policy when the store is created. - Refuse to open the store with a different network policy.
2018-01-09store: Add name to the store and implement 'fmt::Debug'.Justus Winter
- Save the name. We need this to reopen the store. - Implement 'fmt::Debug' so that we can use 'assert_match'.
2018-01-09store: Use the convenience server macros.Justus Winter
2018-01-09core: Improve comment.Justus Winter
2018-01-09core,ffi: Convert 'core::NetworkPolicy' to and from u8.Justus Winter
- At some points, we need to convert the policy to a primitive type. It is better to just provide it. - Use it in the ffi glue.
2018-01-08store: New store module.Justus Winter
- The store stores transferable public keys in a SQLite database. It runs either in an external process, or is co-located in the current process. - The store provides any number of stores for each application, identified by domain and name. Each store maps labels to TPKs. - The store uses a unified pool of TPKs. In the future, this pool is automatically kept up-to-date.
2018-01-08net: Add a module for IPC support.Justus Winter