nopasaran.primitives.action_primitives.certificate_primitives.CertificatePrimitives¶
- class nopasaran.primitives.action_primitives.certificate_primitives.CertificatePrimitives¶
Bases:
objectClass containing Certificate action primitives for the state machine.
- __init__()¶
Methods
__init__()add_common_name(inputs, outputs, state_machine)Add a common name attribute to the certificate subject.
add_country_name(inputs, outputs, state_machine)Add a country name attribute to the certificate subject.
add_locality_name(inputs, outputs, state_machine)Add a locality name attribute to the certificate subject.
add_organization_name(inputs, outputs, ...)Add an organization name attribute to the certificate subject.
add_state_or_province_name(inputs, outputs, ...)Add a state or province name attribute to the certificate subject.
build_certificate(inputs, outputs, state_machine)Build a certificate using the provided private key and subject, and store it in an output variable in the machine's state.
convert_certificate_to_pem(inputs, outputs, ...)Convert the certificate to PEM format and store it in an output variable in the machine's state.
convert_private_key_to_pem(inputs, outputs, ...)Convert the private key to PEM format and store it in an output variable in the machine's state.
generate_private_key(inputs, outputs, ...)Generate an RSA private key and store it in an output variable in the machine's state.
prepare_certificate_subject(inputs, outputs, ...)Prepare an empty certificate subject and store it in an output variable in the machine's state.
- static add_common_name(inputs, outputs, state_machine)¶
Add a common name attribute to the certificate subject.
Number of input arguments: 2
Number of output arguments: 1
Optional input arguments: No
Optional output arguments: No
- Args:
- inputs (List[str]): The list of input variable names. It contains two mandatory input arguments:
The name of the variable containing the certificate subject.
The value of the common name.
outputs (List[str]): The list of output variable names. It contains one mandatory output argument, which is the name of the variable to store the updated certificate subject.
state_machine: The state machine object.
- Returns:
None
- static add_country_name(inputs, outputs, state_machine)¶
Add a country name attribute to the certificate subject.
Number of input arguments: 2
Number of output arguments: 1
Optional input arguments: No
Optional output arguments: No
- Args:
- inputs (List[str]): The list of input variable names. It contains two mandatory input arguments:
The name of the variable containing the certificate subject.
The value of the country name.
outputs (List[str]): The list of output variable names. It contains one mandatory output argument, which is the name of the variable to store the updated certificate subject.
state_machine: The state machine object.
- Returns:
None
- static add_locality_name(inputs, outputs, state_machine)¶
Add a locality name attribute to the certificate subject.
Number of input arguments: 2
Number of output arguments: 1
Optional input arguments: No
Optional output arguments: No
- Args:
- inputs (List[str]): The list of input variable names. It contains two mandatory input arguments:
The name of the variable containing the certificate subject.
The value of the locality name.
outputs (List[str]): The list of output variable names. It contains one mandatory output argument, which is the name of the variable to store the updated certificate subject.
state_machine: The state machine object.
- Returns:
None
- static add_organization_name(inputs, outputs, state_machine)¶
Add an organization name attribute to the certificate subject.
Number of input arguments: 2
Number of output arguments: 1
Optional input arguments: No
Optional output arguments: No
- Args:
- inputs (List[str]): The list of input variable names. It contains two mandatory input arguments:
The name of the variable containing the certificate subject.
The value of the organization name.
outputs (List[str]): The list of output variable names. It contains one mandatory output argument, which is the name of the variable to store the updated certificate subject.
state_machine: The state machine object.
- Returns:
None
- static add_state_or_province_name(inputs, outputs, state_machine)¶
Add a state or province name attribute to the certificate subject.
Number of input arguments: 2
Number of output arguments: 1
Optional input arguments: No
Optional output arguments: No
- Args:
- inputs (List[str]): The list of input variable names. It contains two mandatory input arguments:
The name of the variable containing the certificate subject.
The value of the state or province name.
outputs (List[str]): The list of output variable names. It contains one mandatory output argument, which is the name of the variable to store the updated certificate subject.
state_machine: The state machine object.
- Returns:
None
- static build_certificate(inputs, outputs, state_machine)¶
Build a certificate using the provided private key and subject, and store it in an output variable in the machine’s state.
Number of input arguments: 2
Number of output arguments: 1
Optional input arguments: No
Optional output arguments: No
- Args:
- inputs (List[str]): The list of input variable names. It contains two mandatory input arguments:
The name of the variable containing the private key.
The name of the variable containing the certificate subject.
outputs (List[str]): The list of output variable names. It contains one mandatory output argument, which is the name of the variable to store the built certificate.
state_machine: The state machine object.
- Returns:
None
- static convert_certificate_to_pem(inputs, outputs, state_machine)¶
Convert the certificate to PEM format and store it in an output variable in the machine’s state.
Number of input arguments: 1
Number of output arguments: 1
Optional input arguments: No
Optional output arguments: No
- Args:
inputs (List[str]): The list of input variable names. It contains one mandatory input argument, which is the name of the variable containing the certificate.
outputs (List[str]): The list of output variable names. It contains one mandatory output argument, which is the name of the variable to store the certificate in PEM format.
state_machine: The state machine object.
- Returns:
None
- static convert_private_key_to_pem(inputs, outputs, state_machine)¶
Convert the private key to PEM format and store it in an output variable in the machine’s state.
Number of input arguments: 1
Number of output arguments: 1
Optional input arguments: No
Optional output arguments: No
- Args:
inputs (List[str]): The list of input variable names. It contains one mandatory input argument, which is the name of the variable containing the private key.
outputs (List[str]): The list of output variable names. It contains one mandatory output argument, which is the name of the variable to store the private key in PEM format.
state_machine: The state machine object.
- Returns:
None
- static generate_private_key(inputs, outputs, state_machine)¶
Generate an RSA private key and store it in an output variable in the machine’s state.
Number of input arguments: 0
Number of output arguments: 1
Optional input arguments: No
Optional output arguments: No
- Args:
inputs (List[str]): The list of input variable names.
outputs (List[str]): The list of output variable names. It contains one mandatory output argument, which is the name of the variable to store the generated private key.
state_machine: The state machine object.
- Returns:
None
- static prepare_certificate_subject(inputs, outputs, state_machine)¶
Prepare an empty certificate subject and store it in an output variable in the machine’s state.
Number of input arguments: 0
Number of output arguments: 1
Optional input arguments: No
Optional output arguments: No
- Args:
inputs (List[str]): The list of input variable names.
outputs (List[str]): The list of output variable names. It contains one mandatory output argument, which is the name of the variable to store the certificate subject.
state_machine: The state machine object.
- Returns:
None