missed some TLS_ uses
This commit is contained in:
parent
422a9a93c1
commit
81fa77cf29
1 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ from .contexts import ServerContext
|
||||||
from .matching import Response, ANY
|
from .matching import Response, ANY
|
||||||
from .interface import ICapability
|
from .interface import ICapability
|
||||||
from .params import ConnectionParams, STSPolicy, ResumePolicy
|
from .params import ConnectionParams, STSPolicy, ResumePolicy
|
||||||
from .security import TLS_VERIFYCHAIN
|
from .security import TLSVerifyChain
|
||||||
|
|
||||||
class Capability(ICapability):
|
class Capability(ICapability):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
@ -107,7 +107,7 @@ async def sts_transmute(params: ConnectionParams):
|
||||||
since = (now-params.sts.created)
|
since = (now-params.sts.created)
|
||||||
if since <= params.sts.duration:
|
if since <= params.sts.duration:
|
||||||
params.port = params.sts.port
|
params.port = params.sts.port
|
||||||
params.tls = TLS_VERIFYCHAIN
|
params.tls = TLSVerifyChain()
|
||||||
async def resume_transmute(params: ConnectionParams):
|
async def resume_transmute(params: ConnectionParams):
|
||||||
if params.resume is not None:
|
if params.resume is not None:
|
||||||
params.host = params.resume.address
|
params.host = params.resume.address
|
||||||
|
@ -183,7 +183,7 @@ class CAPContext(ServerContext):
|
||||||
if not params.tls:
|
if not params.tls:
|
||||||
if "port" in sts_dict:
|
if "port" in sts_dict:
|
||||||
params.port = int(sts_dict["port"])
|
params.port = int(sts_dict["port"])
|
||||||
params.tls = TLS_VERIFYCHAIN
|
params.tls = TLSVerifyChain()
|
||||||
|
|
||||||
await self.server.bot.disconnect(self.server)
|
await self.server.bot.disconnect(self.server)
|
||||||
await self.server.bot.add_server(self.server.name, params)
|
await self.server.bot.add_server(self.server.name, params)
|
||||||
|
|
Loading…
Add table
Reference in a new issue