ssl/ssl_verify -> tls/tls_verify

This commit is contained in:
jesopo 2020-04-03 09:50:30 +01:00
parent 2d93e27feb
commit 45ac3be550
3 changed files with 5 additions and 5 deletions

View file

@ -19,7 +19,7 @@ async def main():
"MyNickname",
host = "chat.freenode.invalid",
port = 6697,
ssl = True,
tls = True,
sasl = sasl_params)
await bot.add_server("freenode", params)

View file

@ -25,11 +25,11 @@ class ConnectionParams(object):
nickname: str
host: str
port: int
ssl: bool
tls: bool
username: Optional[str] = None
realname: Optional[str] = None
bindhost: Optional[str] = None
ssl_verify: bool = True
tls_verify: bool = True
sasl: Optional[SASLParams] = None

View file

@ -47,8 +47,8 @@ class Server(IServer):
async def connect(self, params: ConnectionParams):
cur_ssl: Optional[SSLContext] = None
if params.ssl:
cur_ssl = ssl_context(params.ssl_verify)
if params.tls:
cur_ssl = ssl_context(params.tls_verify)
reader, writer = await asyncio.open_connection(
params.host,