RewriteI have finished working on the publisher code rewrite. The rewritten code is now able to perform all of the operations that the old code could, and it has a few improvements to the CLI. However, most of the improvements have been internal to the code.
The main goal of the rewrite was to decouple the code and make it more maintainable. In this, I believe I was successful, some metrics supporting this claim are listed below:
- The code compiles about 4x faster, ~9s instead of about ~40s.
- Only one file depends on OpenSSL, and similarly only one file depends on Boost. Each of these files are only imported by one file, which speeds up compile time and reduces dependencies.
- All basic operations happen through abstract base class interfaces which allow any part to be swapped out with a different implementation without needing to change any of the code. For example, cryptographic operations can be done through the OpenSSL CLI or its C API, and switching the two out only requires changing one line. The other interfaces are an interface for storing other peoples certificates, formatting messages, and storing data to disk.
- The structure of the code base has been changed from a flat layout with all of the files in the same directory, to a heirarchical structure which separates the different modules.
- The publisher API easier to use, which includes storing the publishers private key and certificate instead of asking the user to enter it every time.
- I added a script that parses a C++ source file and extracts the enums in it and outputs functions that map the enums to and from strings.
- I cleaned up data storage and serialization. This made file storage much more stable, and I seperated datum into different files to minimize parsing.
- I made a much simpilier make file that generates dependencies automatically using the C++ compiler.
Things I am currently working on
Publisher AppNow I am working on adding extra convienence features to the publisher app to make it more user friendly. Some of the things that I am working on are:
- Displaying information about a group such as its members, what version it is on, and the derived key of a certain version.
- Adding nicknames to the members certificates so it is easier to refer to a member. Currently you have to know the hex fingerprint of their certificate to add or remove them from a group.
- Communication with the key server. This should simply be a matter of formatting, then using python to send the actual request because I do not want to work with C++ networking when I could just python.