kopia lustrzana https://github.com/Yakifo/amqtt
Merge pull request #53 from cfchou/dev1609
disables verification of the server hostname in the server certificatepull/8/head
commit
fd9b6d8685
|
@ -375,6 +375,8 @@ class MQTTClient:
|
||||||
cadata=self.session.cadata)
|
cadata=self.session.cadata)
|
||||||
if 'certfile' in self.config and 'keyfile' in self.config:
|
if 'certfile' in self.config and 'keyfile' in self.config:
|
||||||
sc.load_cert_chain(self.config['certfile'], self.config['keyfile'])
|
sc.load_cert_chain(self.config['certfile'], self.config['keyfile'])
|
||||||
|
if 'check_hostname' in self.config and isinstance(self.config['check_hostname'], bool):
|
||||||
|
sc.check_hostname = self.config['check_hostname']
|
||||||
kwargs['ssl'] = sc
|
kwargs['ssl'] = sc
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Ładowanie…
Reference in New Issue