+
    4O|je  ã                  ó¦   € R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	H
t
Ht ^ RIHt ]	'       d	   ^ RIHtHt R R	 ltR
 R lt ! R R4      tR# )z%Utilities for caching OCSP responses.)Úannotations)Ú
namedtuple)Údatetime)Útimezone)ÚTYPE_CHECKINGÚAnyÚOptional)Ú_create_lock)ÚOCSPRequestÚOCSPResponsec               ó    € V ^8„  d   QhRRRR/# ©é   Úvaluer   ÚreturnzOptional[_datetime]© )Úformats   "ÚKC:\Users\alokc\chatbot\backend\venv\Lib\site-packages\pymongo/ocsp_cache.pyÚ__annotate__r      ó   € ÷ ñ ˜ð Ð)<ñ ó    c                óV   € \        V R4      '       d   V P                  # V P                  # )z7Compat helper to return the response's next_update_utc.Únext_update_utc)Úhasattrr   Únext_update©r   s   &r   Ú_next_updater      ó*   € ô ˆuÐ'×(Ò(Ø×$Ñ$Ð$Ø×ÑÐr   c               ó    € V ^8„  d   QhRRRR/# r   r   )r   s   "r   r   r   &   r   r   c                óV   € \        V R4      '       d   V P                  # V P                  # )z7Compat helper to return the response's this_update_utc.Úthis_update_utc)r   r    Úthis_updater   s   &r   Ú_this_updater"   &   r   r   c                  ó`   € ] tR t^.tRt]! R. RO4      tR R ltR R ltR R lt	R	 R
 lt
RtR# )Ú
_OCSPCachezA cache for OCSP responses.ÚOcspResponseCacheKeyc               ó   € V ^8„  d   QhRR/# )r   r   ÚNoner   )r   s   "r   r   Ú_OCSPCache.__annotate__6   s   € ÷ $ñ $˜$ñ $r   c                	ó2   € / V n         \        4       V n        R # )N)Ú_datar	   Ú_lock)Úselfs   &r   Ú__init__Ú_OCSPCache.__init__6   s   € Ø.0ˆŒ
ä!“^ˆŽ
r   c               ó    € V ^8„  d   QhRRRR/# )r   Úocsp_requestr
   r   ÚCACHE_KEY_TYPEr   )r   s   "r   r   r(   ;   s   € ÷ 
ñ 
¨;ð 
¸>ñ 
r   c                	ó¬   € V P                  VP                  P                  P                  4       VP                  VP
                  VP                  R 7      # )©Úhash_algorithmÚissuer_name_hashÚissuer_key_hashÚserial_number)r1   r4   ÚnameÚlowerr5   r6   r7   )r,   r0   s   &&r   Ú_get_cache_keyÚ_OCSPCache._get_cache_key;   sM   € Ø×"Ñ"Ø'×6Ñ6×;Ñ;×AÑAÓCØ)×:Ñ:Ø(×8Ñ8Ø&×4Ñ4ð	 #ó 
ð 	
r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úkeyr
   r   r   r   r'   r   )r   s   "r   r   r(   C   s!   € ÷ &.ñ &.˜{ð &.°<ð &.ÀDñ &.r   c                ó¢  € V P                   ;_uu_ 4        V P                  V4      p\        V4      pVf(   V P                  P	                  VR4        RRR4       R# \        V4      pVf    RRR4       R# \        P                  ! \        P                  R7      pVP                  f   VP                  RR7      pYVu;8:  d   V8  g   M  RRR4       R# V P                  P                  VR4      pVf   W P                  V&    RRR4       R# \        V4      pVe   W„8  d   W P                  V&   RRR4       R#   + '       g   i     R# ; i)zÀAdd/update a cache entry.

'key' is of type cryptography.x509.ocsp.OCSPRequest
'value' is of type cryptography.x509.ocsp.OCSPResponse

Validity of the OCSP response must be checked by caller.
N©Útz©Útzinfo)r+   r:   r   r*   Úpopr"   Ú	_datetimeÚnowr   ÚutcrB   ÚreplaceÚget)	r,   r=   r   Ú	cache_keyr   r!   rE   Úcached_valueÚcached_next_updates	   &&&      r   Ú__setitem__Ú_OCSPCache.__setitem__C   s  € ð �Z�Z‹ZØ×+Ñ+¨CÓ0ˆIô
 ' uÓ-ˆKØÒ"Ø—
‘
—‘˜y¨$Ô/Ø÷ ‰Zô ' uÓ-ˆKØÒ"Ø÷ ‰Zô —-’-¤8§<¡<Ô0ˆCØ×!Ñ!Ò)à—k‘k¨�kÓ.�àÖ4¨Ö4Ø÷) ‰Zð0  Ÿ:™:Ÿ>™>¨)°TÓ:ˆLØÒ#Ø(-—
‘
˜9Ñ%Ø÷7 ‰Zô8 ".¨lÓ!;ÐØ!Ò-Ð2DÔ2RØ(-—
‘
˜9Ñ%÷= �Z�ZŠZús$   •>D=ÁD=Á7AD=Ã/D=Ä#D=Ä=E	c               ó    € V ^8„  d   QhRRRR/# )r   Úitemr
   r   r   r   )r   s   "r   r   r(   k   s   € ÷ &ñ & ð &°ñ &r   c                óò  € V P                   ;_uu_ 4        V P                  V4      pV P                  V,          p\        V4      p\	        V4      pVf   Q hVf   Q h\
        P                  ! \        P                  R7      pVP                  f   VP                  RR7      pYFu;8:  d   V8  d   M MVuuRRR4       # V P                  P                  VR4       \        V4      h  + '       g   i     R# ; i)zˆGet a cache entry if it exists.

'item' is of type cryptography.x509.ocsp.OCSPRequest

Raises KeyError if the item is not in the cache.
Nr?   rA   )r+   r:   r*   r"   r   rD   rE   r   rF   rB   rG   rC   ÚKeyError)r,   rO   rI   r   r!   r   rE   s   &&     r   Ú__getitem__Ú_OCSPCache.__getitem__k   sÅ   € ð �Z�Z‹ZØ×+Ñ+¨DÓ1ˆIØ—J‘J˜yÕ)ˆEô ' uÓ-ˆKÜ& uÓ-ˆKØÒ*Ð*Ð*ØÒ*Ð*Ð*Ü—-’-¤8§<¡<Ô0ˆCØ×!Ñ!Ò)à—k‘k¨�kÓ.�ØÖ/ K×/Ø÷ ŠZð  �J‰J�N‰N˜9 dÔ+Ü˜9Ó%Ð%÷# �ZˆZús   •BC%Â>'C%Ã%C6	)r*   r+   Nr3   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r1   r-   r:   rL   rR   Ú__static_attributes__r   r   r   r$   r$   .   s/   † Ù%áØÚRó€Nõ
$õ

õ&.÷P&ñ &r   r$   N)rX   Ú
__future__r   Úcollectionsr   r   rD   r   Útypingr   r   r   Úpymongo.lockr	   Úcryptography.x509.ocspr
   r   r   r"   r$   r   r   r   Ú<module>r_      s;   ðñ ,å "å "Ý *Ý ß /Ñ /å %çß@õõ÷U&ó U&r   