
    8'h                     V    d dl mZ 	 d dlmZ dZd Zd Zd Z	y# e$ r	 d dlmZ Y w xY w)    )absolute_import)sleep)r   peer2strtransport_channel_idc                     |dvrt        dj                  |            | j                  d      }|yt        |d      r|j	                  d      S y)aq  
    Application-layer user authentication protocols are vulnerable to generic
    credential forwarding attacks, where an authentication credential sent by
    a client C to a server M may then be used by M to impersonate C at another
    server S. To prevent such credential forwarding attacks, modern authentication
    protocols rely on channel bindings. For example, WAMP-cryptosign can use
    the tls-unique channel identifier provided by the TLS layer to strongly bind
    authentication credentials to the underlying channel, so that a credential
    received on one TLS channel cannot be forwarded on another.

    )
tls-uniquezinvalid channel ID type {}
ssl_objectNget_channel_bindingr   )cb_type)	Exceptionformatget_extra_infohasattrr
   )	transport	is_serverchannel_id_typessl_objs       Q/var/www/html/trade_iq/venv/lib/python3.12/site-packages/autobahn/asyncio/util.pyr   r   +   s]     o-4;;OLMM&&|4Gw-.**<*@@    c                     t        | t              r+t        |       dk(  rdnd}dj                  | d   | d   |      S t        | t              rdj                  |       S dj                  |       S )	N         ztcp{2}:{0}:{1}r      zunix:{0}z?:{0})
isinstancetuplelenr   str)peerip_vers     r   r   r   C   sd    $$i1n! ''Qa&AA	D#	!!$''t$$r   c            	      b    ddl m g d} t        t        d t	        fd|                   } | S )Nr   )
serializer)CBORSerializerMsgPackSerializerUBJSONSerializerJsonSerializerc                     | S N )xs    r   <lambda>z!get_serializers.<locals>.<lambda>Q   s     r   c                 8    t        |       rt        |       S d S r(   )r   getattr)sr"   s    r   r+   z!get_serializers.<locals>.<lambda>Q   s"    SZ[eghSiQ9O 48 r   )autobahn.wampr"   listfiltermap)serializersr"   s    @r   get_serializersr4   M   s6    (_Kvk3 09:E,G H IKr   N)

__future__r   asyncior   ImportErrortrollius__allr   r   r4   r)   r   r   <module>r:      s?   6 '	0%]   s    ((