mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
chore: remove unwanted code, fix type issues and comments
This commit is contained in:
@ -778,6 +778,16 @@ class PeerAuthenticator:
|
||||
|
||||
"""
|
||||
try:
|
||||
from datetime import datetime, timezone
|
||||
|
||||
now = datetime.now(timezone.utc)
|
||||
|
||||
if certificate.not_valid_after_utc < now:
|
||||
raise QUICPeerVerificationError("Certificate has expired")
|
||||
|
||||
if certificate.not_valid_before_utc > now:
|
||||
raise QUICPeerVerificationError("Certificate not yet valid")
|
||||
|
||||
# Extract libp2p extension
|
||||
libp2p_extension = None
|
||||
for extension in certificate.extensions:
|
||||
|
||||
Reference in New Issue
Block a user