fix connecting with python3 internal ssl implementation
This commit is contained in:
parent
379fb0c515
commit
d20dcfccea
|
@ -1326,7 +1326,7 @@ class Connection(CommonConnection, ConnectionHandlers):
|
|||
certificate=con.Connection.ssl_certificate[i]))
|
||||
return True
|
||||
i += 1
|
||||
if hasattr(con.Connection, 'ssl_fingerprint_sha1'):
|
||||
if len(con.Connection.ssl_fingerprint_sha1):
|
||||
saved_fingerprint = gajim.config.get_per('accounts', self.name,
|
||||
'ssl_fingerprint_sha1')
|
||||
if saved_fingerprint:
|
||||
|
|
|
@ -1568,10 +1568,10 @@ class NewAccountConnectedEvent(nec.NetworkIncomingEvent):
|
|||
self.ssl_msg = ssl_error.get(er, _('Unknown SSL error: %d') % \
|
||||
er)
|
||||
self.ssl_cert = ''
|
||||
if hasattr(self.conn.connection.Connection, 'ssl_cert_pem'):
|
||||
if len(self.conn.connection.Connection.ssl_cert_pem):
|
||||
self.ssl_cert = self.conn.connection.Connection.ssl_cert_pem
|
||||
self.ssl_fingerprint = ''
|
||||
if hasattr(self.conn.connection.Connection, 'ssl_fingerprint_sha1'):
|
||||
if len(self.conn.connection.Connection.ssl_fingerprint_sha1):
|
||||
self.ssl_fingerprint = \
|
||||
self.conn.connection.Connection.ssl_fingerprint_sha1
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue