2.1.2.1.3. tests.utils.crypto_extension_utils

2.1.2.1.3.1. Classes

CryptographicExtensionUtils

Utility functions for Arm Cryptographic Extension tests.

2.1.2.1.3.2. Module Contents

class tests.utils.crypto_extension_utils.CryptographicExtensionUtils[source]

Utility functions for Arm Cryptographic Extension tests. Provides helper methods to:

  • Generate self-signed certificates

  • Start and stop SSL servers

  • Perform HTTPS downloads with timing

_generate_certificate(mgr, port, days)[source]

Generate a self-signed certificate using OpenSSL

Parameters:
  • mgr – Manager object to execute commands

  • port – Console port to run commands on

  • days – Number of days the certificate is valid

Returns:

None

Return type:

None

_start_ssl_server(mgr, port)[source]

Start SSL server serving 100MB random data file

Parameters:
  • mgr – Manager object to execute commands

  • port – Console port to run commands on

Returns:

None

Return type:

None

_cleanup_server(mgr, port)[source]

Cleanup the server process by bringing it to foreground and terminating

Parameters:
  • mgr – Manager object to execute commands

  • port – Console port to run commands on

Returns:

None

Return type:

None

_cleanup_files(mgr, port)[source]

Cleanup generated certificate files

Parameters:
  • mgr – Manager object to execute commands

  • port – Console port to run commands on

Returns:

None

Return type:

None

_extract_time_fields(output)[source]

Extract timing information from the ‘time’ command output. Returns a dictionary with ‘real’, ‘user’, and ‘sys’ timing values.

Parameters:

output (str) – The output string from the ‘time’ command

Returns:

A dictionary with keys ‘real’, ‘user’, ‘sys’ and their corresponding timing values in seconds

Return type:

dict

_download(mgr, port, enable_crypto, timeout=60)[source]

Download data from the SSL server using openssl s_client with specified cipher and return timing information.

Parameters:
  • mgr – Manager object to execute commands

  • port – Console port to run commands on

  • enable_crypto (bool) – Flag to enable or disable cryptographic operations

  • timeout (int) – Timeout for the download command

Returns:

A dictionary with keys ‘real’, ‘user’, ‘sys’ and their corresponding timing values in seconds

Return type:

dict