|
branko
|
aacc3211e5e0
|
8 months ago
|
|
GC-43: Fix Python 3.11 failing CLI test due to subparser masking: - Renamed the subparser commands to be fully distinct. - The subparser registration is never reset since the Python test file is run as part of a single process, thus the two tests would register two subparsers under the same subcommand. - In older versions of Python this was not a problem, but with newer verions (3.11+) this inconsistency has been fixed. For more details, see: https://bugs.python.org/issue39716
|
|
branko
|
5c9e817249b5
|
8 months ago
|
|
GC-45: Update copyright information:
- Changes to code base were previously done in 2020 as well (based on git history).
|
|
branko
|
8db14e9c5a3e
|
4 years ago
|
|
GC-37: The --csr and --key-specification options should be exclusive:
- Updated list of invalid invocations in the unit tests. - Updated parsers for server and client subcommands.
|
|
branko
|
786db20c24f1
|
4 years ago
|
|
|
|
branko
|
f50c697c8fd0
|
4 years ago
|
|
GC-37: Deduplicate additional tests for validation of CLI arguments:
- Merge the tests for invoking commands without mandatory positional arguments into test for invalid CLI invocations. - Merge the tests for invoking renew commands with conflicting positional arguments into test for invalid CLI invocations.
|
|
branko
|
41de163e243b
|
4 years ago
|
|
GC-37: Added ECDSA support for issuing client certificates via client command:
- Added functional test. - Updated unit tests. - Expose ECDSA key specification in the client command help.
|
|
branko
|
c3e3f7ebf69d
|
4 years ago
|
|
GC-37: Added ECDSA support for issuing server certificates via server command:
- Added functional test. - Added unit tests. - Updated existing functional test that checks for avertising of curve support for key specification in the init command to be a bit less fragile in case the output gets broken-up into different lines in a slightly different location. - Implement ability to get public key specification out of ECDSA public key. - Expose ECDSA key specification in the server command. - Updated inline documentation.
|
|
branko
|
272ebabc4062
|
4 years ago
|
|
GC-37: Added ECDSA support for initialising CA hierarchy:
- Added functional test. - Added unit tests. - Updated key specification parsing to support ECDSA specification using curve name. - Updated KeyGenerator to handle ECDSA private keys generation. - Updated inline documentation.
|
|
branko
|
dd7acf3d352f
|
4 years ago
|
|
GC-37: Added support for requesting custom RSA key size when renewing:
- Added functional test. - Added unit tests. - Updated existing functional test for renew command help to cope with addition of one more option (output lines from help changed). - Added new CLI option for passing-in key specification, used in combination with the --new-private-key option. - Renew command function now accepts key specification parameter. Updated existing code and tests accordingly for the new function signature. - If key specification is not passed-in and new private key is requested, key size is extracted from existing artefacts (e.g. it does not use CA hierarchy's key size).
|
|
branko
|
1ef5f76a8224
|
4 years ago
|
|
GC-37: Added support for requesting custom RSA key size when issuing client certificates:
- Added functional test. - Added unit tests. - Added new CLI option to the client command. - Updated the client command to use the passed-in key specification. - Updated existing tests to cope with changes to the client command function signature. - Fixed small typo in docstring for the server command. - Fixed functional test for client command help that expected positional argument in a specific line.
|
|
branko
|
70b0277c55dc
|
4 years ago
|
|
GC-37: Added support for requesting custom RSA key size when issuing server certificates:
- Added functional test. - Added unit tests. - Added new CLI option to the server command. - Updated the server command to use the passed-in key specification. - Updated existing tests to cope with changes to the server command function signature.
|
|
branko
|
de1cc2505a56
|
4 years ago
|
|
GC-37: Refactor key specification handling:
- Perform the key specification parsing within CLI module itself, don't do it via crypto module. - Pass-in tuple consisting out of algorithm and associated parameters into the init command instead of key generator. - Updated all tests to accomodate the change in init function signature. - Simplify the KeyGenerator class. - Do not test if KeyGenerator class sets the properties via constructor - it is sufficient to test string represenation and key generation.
|
|
branko
|
52d85e47faa0
|
4 years ago
|
|
GC-37: Added support for requesting custom RSA key size when initialising the CA hierarchy:
- Added functional test. - Added unit tests. - Added new CLI option for specifying the algorithm. - Implemented KeyGenerator factory-like class that can be called to generate a private key with desired specification. - The init init function now accepts a callable that is used to generate private keys. - The generate_ca_hierarchy function now accepts a callable that is used to generate private keys. - Updated existing unit tests to cope with changes to the init and generate_ca_hierarchy function signatures. - Updated existing unit tests to cope with changes to existing functionality. - Updated existing functional tests to cope with changes in command output.
|
|
branko
|
6eaac492b941
|
6 years ago
|
|
GC-23: Removed option to update DNS names from server command:
- Removed functional test. - Dropped the option from CLI. - Dropped the option from command function implementation. - Updating code for new command function signature. - Updated existing unit tests. - Removed unneeded unit tests.
|
|
branko
|
cdda72ee4c8a
|
6 years ago
|
|
|
|
branko
|
035fb09894ef
|
6 years ago
|
|
GC-23: Implemend option for updating DNS names for renew command:
- Added functional test covering the new functionality. - Implemented ability to accept new DNS names in the renew command. - Updated existing unit tests for new function signature. - Added unit tests covering the new functionality.
|
|
branko
|
1b16b8ce67df
|
6 years ago
|
|
Noticket: Compatibility fixes for Python 3.4:
- Fixed invocation of pexepect.spawnu to convert the passed-in arguments explicitly into a list. Necessary since Python 3.4 can't use the *args construct outside of assignment. - Updated the certificate_to_pem function to return str instead of bytes. Necessary since Python 3.4 does not support things like b"%s" % mybytes. - Fixed test for existence of help CLI command. Previous code was referencing a wrong/non-existent function help (the actual name has to be help_ in order not to shadow the built-in function). - Updated unit test invocations that use the read_certificate function. - Updated tests for the read_certificate function.
|
|
branko
|
ae6e41dde81c
|
6 years ago
|
|
GC-22: Updated renew command to replace existing private key with CSR if passed-in:
- Added functional test which covers renewal of server and client certificates using CSR when previous certificate was issued using private key. - Replaced the private key with CSR when renewing certificate using CSR in case where previous certificate was issued with private key. - Updated signature for renew command to accept path to custom CSR. - Updated existing unit tests for new renew command signature. - Added unit tests covering new functionality.
|
|
branko
|
45c0a6805fac
|
6 years ago
|
|
GC-22: Implemented issuance of server certificates using passed-in CSR:
- Added functional test. - Expanded server command to accept path to custom CSR file and handle it appropriatelly. - Updated existing unit tests to fix command server invocation. - Added new unit tests.
|
|
branko
|
647208f5016b
|
6 years ago
|
|
GC-22: Implemented issuance of client certificates using passed-in CSR:
- Added functional test covering the issuance of client certificate using CSR. - Updated default value for the CSR client command option to be explicitly None. - Updated the client command to take in the CSR as an argument and process it accordingly. - Added helpers for generating CSR, as well as writing and reading them to/from file. - Updated existing tests to use new signature for the client command. - Added new unit tests for implemented functionality.
|
|
branko
|
6179b9f6ceb6
|
6 years ago
|
|
GC-22: Added options to parser for accepting CSR for issuing/renewing certificates:
- Implemented functional test for verifying option availability. - Added CSR option to server, client, and renew commands. - Make the new CSR option and --new-private-key option exclusive with each other.
|
|
branko
|
108dfefd1032
|
7 years ago
|
|
GC-20: Show informative message when calling status command on uninitialised directory:
- Added small function test to cover the scenario when status command is called on an uninitalised directory. - Updated the status command implementation. - Implemented the necessary unit tests.
|
|
branko
|
87692ece8441
|
7 years ago
|
|
GC-20: Added initial dummy implementation of status command:
- Added functional test checking if the command is available and has help. - Updated unit tests for new CLI command. - The command does not do anything at the moment.
|
|
branko
|
44714529d7a2
|
7 years ago
|
|
Noticket: Deduplicate testing of functions that set-up subcommand parsers:
- Updated the CLI tests. - Introduced parametrized tests for checking return object of set-up subcommand parser functions (will go through all registered functions). - Introduced parametrized test for checking if functions used for setting-up subcommand parsers had been registred correctly via decorator. - Remove old tests that got replaced as part of this paramtrization.
|
|
branko
|
2149ea163485
|
7 years ago
|
|
Noticket: Deduplicate testing of command availaibility and help flags:
- Updated CLI tests related to testing of what commands are available, and if they accept the help (long and short form) flag. - Commands are provided via Pytest parametrisation. - Changed tests cover primarily the parser behaviour.
|
|
branko
|
09bc97be71d0
|
7 years ago
|
|
Noticket: Deduplicate testing of CLI invocation:
- Updated CLI tests related to testing of acceptable/expected invocations. - Introduced mechanism for specifying CLI invocation that should not produce errors using Pytest parametirsation. - Replaced all tests that verify just the parser handling of input arguments (presence, not necessarily content).
|
|
branko
|
66963b46b7b6
|
7 years ago
|
|
GC-18: Added option for generating a new private key during certificate renewal:
- Implemented functional test for the new scenario. - Fixed incorrect check for client certificate validity in existing functional test for client certificate renewal. - Updated documentation to include information about generating a new private key during certificate renewal. - Added option of generating a new private key to the renewal command. - Updated existing code to use new signature for renewal command and function. - Added inline function documentation for the renew command code. - Implemented relevant unti tests that cover new option.
|
|
branko
|
dcac57e9457b
|
7 years ago
|
|
GC-18: Error-out in case renew is called on uninitialised hierarchy:
- Added functional test for scenario. - Implemented dummy renew command that for now just verifies the hierarchy has been initialised. - Implemented unit tests.
|
|
branko
|
95c7e343aa57
|
7 years ago
|
|
GC-18: Added initial dummy implementation of the renew command:
- Added functional test covering testing of available help for the renew command. - Implemented unit tests - Registered a renew command parser setup function with CLI.
|
|
branko
|
2450d422e8af
|
7 years ago
|
|
GC-19: Added option for updating server certificate DNS names:
- Added functional test covering the new scenario. - Added option to server command for updating DNS names for already issued certificate. Private key is kept for this purpose. - Implemented unit tests. - Fixed functional test related to viewing short usage instructions.
|
|
branko
|
a6b448968a50
|
7 years ago
|
|
GC-16: Implemented issuance of client certificates:
- Added functional test covering basic issuance of client certificates. - Replaced the dummy command implementation. - Added new crypto function that can be used for issuing TLS client certificates. - Implemented relevant unit tests.
|
|
branko
|
500f5d252fbd
|
7 years ago
|
|
GC-16: Implemented scenario for issuing client certificates when hierarchy is not initialised:
- Added functional test that checks if an error is shown to user in case the hierarchy hasn't been initialised prior to issuing a client certificate. - Added initial dummy client command implementation.
|
|
branko
|
ce28175b4896
|
7 years ago
|
|
GC-16: Added client command parser:
- Added functional test for checking availability of client command and its help. - Added initial dummy implementation with parser.
|
|
branko
|
46ab61547ff2
|
7 years ago
|
|
|
|
branko
|
637d64ca88f7
|
7 years ago
|
|
GC-17: Removed redundant tests, cleaned-up tests for commands module and fixed wrong directory used for outputting server artifacts in server command:
- Removed CLI tests that check if command errors-out in case the hierarchy has already been initialised (for init command) or has not been initialised (for server command). These are part of commands module tests already. - Removed unnecessary changing of directory within the commands tests. - Fixed issue where server artifacts paths are not calculated correctly when writing them out (parent directory was not part of path).
|
|
branko
|
a3aeacfe4de8
|
7 years ago
|
|
GC-17: Deduplicate exits in command wrapper functions:
- Move all calls to exit to the main function. - Update signature of all wrapper functions to return status code. - Update a couple of CLI tests to not fail due to systemexit being thrown (instead of mocking away too much).
|
|
branko
|
5a9a3eede117
|
7 years ago
|
|
GC-17: Refactored calls to help and usage printing functions:
- Introduced distinct help/usage functions in commands module. - Wrap the help/usage in similar way to existing commands. - Added unit tests for new commands and their invocation from CLI.
|
|
branko
|
332380e47daf
|
7 years ago
|
|
GC-17: Refactored server command to handle output and return exit code:
- Updated server command to return just a status code. - Updated existing code and tests that call out to the server command to use correct function signature. - Moved output from cli module to commands module. - Updated existing tests for the server command to test for output being produced in correct streams.
|
|
branko
|
84ba90064e85
|
7 years ago
|
|
GC-17: Refactored init command to handle output and return exit code:
- Introduced a holder class for command exit codes. - Moved output for the cli module to commands module. - Implemented new tests for verifying the command output. - Updated existing tests for verifying return value of command output. - Updated existing code and tests to use the new signature for init command.
|
|
branko
|
407076b32362
|
7 years ago
|
|
GC-15: Prevent server command from overwriting artifacts and clean-up incorrect CLI tests:
- Added functional test for scenario where a server certificate has already been issued. - Updated server certificate issuance command not to overwrite the artifacts. - Fixed a couple of both server and init tests related to CLI parsing to not create artifacts unless necessary, and if necessary to create artifacts in temporary (test) directory. Otherwise intermittent failures will happen.
|
|
branko
|
1d67951da5af
|
7 years ago
|
|
GC-15: Implemented functionality for including extra DNS names in server certificates:
- Added functional test covering the new scenario. - Updated invocations of relevant commands in existing code to pass-in the list of extra DNS names where appropriate. - Updated server command and high-level function for issuing server certificates to accept list of additional DNS subject alternative names to include in certificate. - Fixed existing unit tests. - Added additional unit tests that cover the new function.
|
|
branko
|
7a2919409da2
|
7 years ago
|
|
GC-15: Implemented functionality for issuing a server certificate:
- Added functional test covering the user scenario. - Updated CLI implementation to show user message about issued server artifacts. - Implemented functionality in the server command. - Fixed a small typo in docstring for issue_certificate function. - Implemented high-level crypto function for issuing server certificates. - Implemented additional storage functions for reading an entire CA hierarchy, individual private keys, and individual certificates. - Implemented the necessary unit tests covering newly implemented code.
|
|
branko
|
988ac40d5cec
|
7 years ago
|
|
GC-15: Implemented scenario for server certificate issuance where user has not initialised the CA hierarchy:
- Added functional test that tests if correct error is shown to user in case he/she has not initialised the CA hierarchy. - Introduced new function to check if storage is initialised. - Added initial simplified server command implementation.
|
|
branko
|
e17474c5ef5d
|
7 years ago
|
|
GC-15: Added server command parser:
- Added functional test for testing new command presence and help. - Added initial parser implementation.
|
|
branko
|
11712c273c16
|
7 years ago
|
|
GC-3: Implement option for specifying CA hierarchy depth during initialisation:
- Minor fix for option checks to make the more reliable (for short flags). - Added functional test for initialising a CA hierarchy with custom depth. - Added option for specifying the CA hierarchy depth (defaults to 1). - Updated the init command to accept and process the CA hierarchy depth option correctly. - Updated function used for issuing certificates to accept list of extensions to be added to certificate. - Updated function used for generating the CA hierarchy to add the CA basic constraint extension.
|
|
branko
|
f2df385b1493
|
7 years ago
|
|
GC-3: Added ability to provide custom CA base name to init command:
- Added functional test to cover the new scenario (providing CA base name). - Updated init command to accept the CA base name to be used when constructing the CA subject DN. - Updated the existing tests to pass-in the CA base name explicitly. - Updated the CLI code to allow for user to pass-in the CA base name via option (both short and long form available).
|
|
branko
|
130684592129
|
7 years ago
|
|
GC-3: Refactored main functionality of the init command into separate function:
- Introduced a new module (commands) where the majority of command implementation should reside. - The cli module should now be a thin wrapper around commands, in charge of processing input system arguments. - Refactored the tests accordingly.
|
|
branko
|
9f09715ce550
|
7 years ago
|
|
GC-3: Implemented CA hierarchy initialisation:
- Added functional test for initialising hierarchy on a fresh directory. - Implemented the init command. - Added two new modules for working with storage and crypto. - Added cryptography (for certificate issuance and crypto) and python-dateutil (for better handling of certificate validities) as installation dependencies. - Added freezegun as test dependency (helps with testing validity dates). - Implemented necessary unit tests.
|
|
branko
|
95e112372df9
|
7 years ago
|
|
GC-3: Added dummy command for CA initialisation:
- Fixed test for the help command (help output now includes multiple comands). - Added dummy/skeleton implementation for init command parser.
|
|
branko
|
0590c952df64
|
7 years ago
|
|
GC-11: Added a help subcommand to the tool:
- Updated functional test for checking on the help subcommand as well. - Implemented the 'help' subcommand. - Updated required function signature for the subcommand_parser decorator (functions should return ArgumentParser instance). - Fixed a typo in inline documentation. - Updated the test for subcommand_parser decorator to be a more robust when checking if function registration works.
|
|
branko
|
e82ee8e024f4
|
7 years ago
|
|
|
|
branko
|
cf5813628ae1
|
7 years ago
|
|
GC-11: Updated CLI to display simple usage help:
- Added terse description to the CLI. - Implemented small mechanism for invoking callback functions attached to parser. - Fixed some linting issues in setup script.
|
|
branko
|
d8ec591edb40
|
7 years ago
|
|
GC-11: Added intial dummy CLI skeleton implementation:
- Register entry point in the package setup script. - Implemented a very basic main function as entry point that constructs an empty argument parser. - Implemented functional test for testing if the CLI tool gets invoked correctly after installation. - Added unit tests for implemented functionality.
|