INNER CODE UNIT · Python

detect_wolf_features

wolfSSL/wolfssl · scripts/multi-msg-record.py:121

def detect_wolf_features():
    """Probe the wolfSSL client binary to find which features are
    compiled in.  Used to decide which test phases to run.

    Returns dict with keys: tls12 (bool), tls13 (bool),
    secure_reneg (bool), rsa (bool), ciphers (set[str]), ca_cert (str).
    """
    feats = {"tls12": False, "tls13": False, "secure_reneg": False,
             "rsa": True,
             "ciphers": set(),
             "ca_cert": os.path.join(CERT_DIR, "ca-cert.pem")}

    # ./client -V  ->  e.g. "3:4:d(downgrade):e(either):"
    try:
        r = subprocess.run([WOLF_CLIENT, "-V"],
                           capture_output=True, timeout=5)
        parts = r.stdout.decode("utf-8", errors="replace").strip().split(":")
        feats["tls12"] = "3" in parts

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…