Python implementation of WebRTC and ORTC for real-time peer-to-peer communication
87
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.
Create an async function create_dtls_transport() that:
Create a function get_fingerprints(dtls_transport) that:
algorithm and value keysCreate 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
Provides WebRTC and ORTC implementation including DTLS transport with certificate management.
@satisfied-by
@generates
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"
"""
passInstall with Tessl CLI
npx tessl i tessl/pypi-aiortcdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10