INNER CODE UNIT · Python
QscNginxUser
open-quantum-safe/oqs-demos · locust/scenarios/locustfile.py:21
class QscNginxUser(HttpUser):
wait_time = between(1, 2)
def on_start(self):
self.client.base_url = host
logger.info("Starting Locust test using OpenSSL for TLS connection")
def make_post_quantum_request_with_openssl(self, endpoint):
try:
logger.debug(f"Making request to {url}{endpoint} with group {group}")
host_and_port = host + ":" + str(port)
http_headers="Post-quantum"
request_name = f"Group {group} {endpoint}"
start = time.time()
result = subprocess.run(
["openssl", "s_client", "-groups", group, "-connect", host_and_port, "-ign_eof"],
input=f"GET {endpoint} HTTP/1.1\r\n"