request.tests.openssl_keygen_factoryΒΆ
ClassesΒΆ
Abstract base class for key generation components. |
|
RSA key generation using OpenSSL genrsa command. |
|
ECC key generation using OpenSSL ecparam command. |
|
Component for specifying the output file (-out argument). |
|
Composite key generator that combines multiple components. |
Module ContentsΒΆ
- class request.tests.openssl_keygen_factory.KeyGenerationComponent[source]ΒΆ
Bases:
abc.ABCAbstract base class for key generation components.
- class request.tests.openssl_keygen_factory.RSAKeyGenerator(key_size=2048)[source]ΒΆ
Bases:
KeyGenerationComponentRSA key generation using OpenSSL genrsa command.
- Parameters:
key_size (int)
- build_args(context)[source]ΒΆ
Build OpenSSL genrsa command arguments.
- Parameters:
context (dict[str, Any])
- Return type:
list[str]
- class request.tests.openssl_keygen_factory.ECKeyGenerator(curve_name='secp256r1')[source]ΒΆ
Bases:
KeyGenerationComponentECC key generation using OpenSSL ecparam command.
- Parameters:
curve_name (str)
- class request.tests.openssl_keygen_factory.KeyFileOutput(file_path=None, auto_generate_path=True)[source]ΒΆ
Bases:
KeyGenerationComponentComponent for specifying the output file (-out argument).
- Parameters:
file_path (str | None)
auto_generate_path (bool)
- class request.tests.openssl_keygen_factory.CompositeKeyGenerator(name, description=None)[source]ΒΆ
Composite key generator that combines multiple components.
- Parameters:
name (str)
description (str)
- components: list[KeyGenerationComponent] = [][source]ΒΆ
- add_component(component)[source]ΒΆ
Add a component to this composite generator.
- Parameters:
component (KeyGenerationComponent)
- Return type:
- build_command(context=None)[source]ΒΆ
Build the complete OpenSSL command from all components.
- Parameters:
context (dict[str, Any])
- Return type:
list[str]