INNER CODE UNIT · Python

on_start

open-quantum-safe/oqs-demos · locust/scenarios/locustfile.py:24

    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"
                      f"Host: {host}\r\n"
                      f"User-Agent: {http_headers}\r\n"
                      f"Connection: close\r\n\r\n",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…