Reseed: rewrite implementation. Resolves #149.
Created by: anonimal
By submitting this pull request, I confirm the following:
- I have read and understood the contributor guide.
- I have checked that another pull request for this purpose does not exist.
- I have considered and confirmed that this submission will be valuable to others.
- I accept that this submission may not be used and that this pull request may be closed by the will of the maintainer.
- I give this submission freely and claim no ownership to its content.
Place an X inside the bracket to confirm
-
I confirm.
Fixes #141 (closed) and resolves #149 (closed)
- C++11 (minimum) refactor
- Create/rewrite appropriate classes
- Improve class Reseed
- Create classes SU3, ZIP, X509, and HTTP
- Refactoring: move the mess of local variables into a POD type
- Use spec-identifiable constants instead of raw numbers
- Move class ZIP to core/util/ZIP.{h,cpp}
- Move class X509 to core/crypto/X509.{h,cpp}
- Design rewrite
- Create better reseed abstraction
- See constructors, design, and interface of class Reseed/SU3/ZIP/X509
- Separate parsing:
- Class SU3 parsing from X.509/signature parsing and from class ZIP parsing
- Rewrite/refactor related class NetDb code
- Refactor: get rid of -1 return values, use bool and adjust related code
- Create better reseed abstraction
- Create/implement stream abstraction
- Stream wrapper for strongly-typed classes
- Abstract CryptoPP from class ZIP and class X509
- Pimpl ZIP decompression
- Pimpl X.509 and separate cert processing from decoding
- Ensure uncaught exceptions are caught
- Cleanup pimpl-related directory structure
- Feature: manual reseed: create/implement an overloaded
--reseed-from
run-time switch- Handles reseeding from file
- Handles reseeding from specified URL
- Feature: create/implement
--reseed-skip-ssl-check
run-time switch- Allows connecting to servers with certificates not shipped with Kovri (such as a local server)
- Users can still put their self-signed cert in
KOVRI_DATA_DIR/certificates/su3
and skip this switch if desired
- HTTP: minor design refactor to accommodate new class Reseed design
- Download function stores results in member stream, returns bool
- HTTP response is stored in member variable
- Logic design refactor to fix erroneous error response and help with debugging
- Spec review
- Ensure that SU3 implementation meets requirements and provides a minimal interface to implement future content-types and/or specifications (ex. for auto-update or news feed)
- Ensure that ZIP meets minimum requirements for our use-case
- Create secure sanity checks
- Create unit tests (referencing #7 (closed))
- Tests for class SU3, ZIP, and X509
- Cleanup unit-test directory structure and rename appropriate files
- Adjust CMake accordingly
- Document code
- Extensive documentation where possible
- Resolve any preexisting TODO's
- General improvements and rewrites