e
This commit is contained in:
parent
00000d940e
commit
00000d9b81
1 changed files with 1 additions and 1 deletions
|
|
@ -52,7 +52,7 @@ async def refresh_cert_cache(client: httpx.AsyncClient) -> ssl.SSLContext:
|
||||||
|
|
||||||
async def get_cert(client: httpx.AsyncClient) -> ssl.SSLContext:
|
async def get_cert(client: httpx.AsyncClient) -> ssl.SSLContext:
|
||||||
if CERT_FILE.is_file():
|
if CERT_FILE.is_file():
|
||||||
mtime = datetime.fromtimestamp(CERT_FILE.stat().st_mtime)
|
mtime = datetime.fromtimestamp(CERT_FILE.stat().st_mtime, TZ)
|
||||||
|
|
||||||
if now - mtime < timedelta(days=30):
|
if now - mtime < timedelta(days=30):
|
||||||
return ssl.create_default_context(cafile=CERT_FILE)
|
return ssl.create_default_context(cafile=CERT_FILE)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue