CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-aiortc

Python implementation of WebRTC and ORTC for real-time peer-to-peer communication

87

1.02x
Overview
Eval results
Files

task.mdevals/scenario-7/

DTLS Transport Inspector

Build a utility that inspects DTLS transport security configurations for WebRTC connections. The tool should create secure DTLS transports and extract their certificate fingerprint information for security analysis.

Capabilities

DTLS Transport Creation

Create an async function create_dtls_transport() that:

  • Initializes an ICE gatherer
  • Gathers local ICE candidates (may use default servers)
  • Creates an ICE transport from the gatherer
  • Creates and returns a DTLS transport over the ICE transport

Fingerprint Extraction

Create a function get_fingerprints(dtls_transport) that:

  • Retrieves the local DTLS parameters from the given transport
  • Extracts all certificate fingerprints
  • Returns a list of dictionaries, each containing algorithm and value keys

Parameter Retrieval

Create a function get_dtls_role(dtls_transport) that:

  • Retrieves the local DTLS parameters

  • Returns the DTLS role as a string (either "client" or "server")

  • create_dtls_transport() returns an RTCDtlsTransport instance @test

  • get_fingerprints() returns a list containing at least one fingerprint @test

  • Each fingerprint has an algorithm key with a string value like "sha-256" @test

  • Each fingerprint has a value key with a non-empty string @test

  • get_dtls_role() returns either "client" or "server" @test

Dependencies { .dependencies }

aiortc { .dependency }

Provides WebRTC and ORTC implementation including DTLS transport with certificate management.

@satisfied-by

Implementation

@generates

API

async def create_dtls_transport():
    """
    Create a DTLS transport over ICE.

    Returns:
        RTCDtlsTransport: A DTLS transport instance
    """
    pass

def get_fingerprints(dtls_transport):
    """
    Extract certificate fingerprints from a DTLS transport.

    Args:
        dtls_transport: RTCDtlsTransport instance

    Returns:
        list: List of dictionaries, each with 'algorithm' and 'value' keys
              representing certificate fingerprints
    """
    pass

def get_dtls_role(dtls_transport):
    """
    Get the DTLS role from a transport.

    Args:
        dtls_transport: RTCDtlsTransport instance

    Returns:
        str: DTLS role, either "client" or "server"
    """
    pass

Install with Tessl CLI

npx tessl i tessl/pypi-aiortc

tile.json