Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mesonium
gajim
Commits
47bf21d2
Commit
47bf21d2
authored
4 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
Rename methods/vars
SSL -> TLS
parent
1f8d766a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gajim/common/client.py
+8
-8
8 additions, 8 deletions
gajim/common/client.py
gajim/common/helpers.py
+1
-1
1 addition, 1 deletion
gajim/common/helpers.py
gajim/gtk/ssl_error_dialog.py
+1
-1
1 addition, 1 deletion
gajim/gtk/ssl_error_dialog.py
with
10 additions
and
10 deletions
gajim/common/client.py
+
8
−
8
View file @
47bf21d2
...
...
@@ -33,7 +33,7 @@
from
gajim.common.helpers
import
get_user_proxy
from
gajim.common.helpers
import
warn_about_plain_connection
from
gajim.common.helpers
import
get_resource
from
gajim.common.helpers
import
get_ignored_
ssl
_errors
from
gajim.common.helpers
import
get_ignored_
tls
_errors
from
gajim.common.helpers
import
get_idle_status_message
from
gajim.common.idle
import
Monitor
from
gajim.common.i18n
import
_
...
...
@@ -79,7 +79,7 @@ def __init__(self, account):
self
.
_destroy_client
=
False
self
.
_remove_account
=
False
self
.
_
ssl
_errors
=
set
()
self
.
_
tls
_errors
=
set
()
self
.
_destroyed
=
False
...
...
@@ -178,7 +178,7 @@ def _create_client(self):
app
.
cert_store
.
get_certificates
())
self
.
_client
.
set_ignored_tls_errors
(
get_ignored_
ssl
_errors
(
self
.
_account
))
get_ignored_
tls
_errors
(
self
.
_account
))
if
app
.
config
.
get_per
(
'
accounts
'
,
self
.
_account
,
'
use_plain_connection
'
):
...
...
@@ -200,8 +200,8 @@ def _create_client(self):
for
handler
in
modules
.
get_handlers
(
self
):
self
.
_client
.
register_handler
(
handler
)
def
process_
ssl
_errors
(
self
):
if
not
self
.
_
ssl
_errors
:
def
process_
tls
_errors
(
self
):
if
not
self
.
_
tls
_errors
:
self
.
connect
(
ignore_all_errors
=
True
)
return
...
...
@@ -209,7 +209,7 @@ def process_ssl_errors(self):
account
=
self
.
_account
,
connection
=
self
,
cert
=
self
.
_client
.
peer_certificate
[
0
],
error_num
=
self
.
_
ssl
_errors
.
pop
())
error_num
=
self
.
_
tls
_errors
.
pop
())
def
_on_resume_failed
(
self
,
_client
,
_signal_name
):
log
.
info
(
'
Resume failed
'
)
...
...
@@ -261,13 +261,13 @@ def _on_disconnected(self, _client, _signal_name):
self
.
_reconnect
=
False
elif
domain
==
StreamError
.
BAD_CERTIFICATE
:
self
.
_
ssl
_errors
=
self
.
_client
.
peer_certificate
[
1
]
self
.
_
tls
_errors
=
self
.
_client
.
peer_certificate
[
1
]
self
.
get_module
(
'
Chatstate
'
).
enabled
=
False
self
.
_reconnect
=
False
self
.
_after_disconnect
()
app
.
nec
.
push_incoming_event
(
NetworkEvent
(
'
our-show
'
,
account
=
self
.
_account
,
show
=
'
offline
'
))
self
.
process_
ssl
_errors
()
self
.
process_
tls
_errors
()
elif
domain
in
(
StreamError
.
STREAM
,
StreamError
.
BIND
):
if
error
==
'
conflict
'
:
...
...
This diff is collapsed.
Click to expand it.
gajim/common/helpers.py
+
1
−
1
View file @
47bf21d2
...
...
@@ -1545,7 +1545,7 @@ def warn_about_plain_connection(account, connection_types):
return
False
def
get_ignored_
ssl
_errors
(
account
):
def
get_ignored_
tls
_errors
(
account
):
ignore_ssl_errors
=
app
.
config
.
get_per
(
'
accounts
'
,
account
,
'
ignore_ssl_errors
'
).
split
()
return
{
Gio
.
TlsCertificateFlags
(
int
(
err
))
for
err
in
ignore_ssl_errors
}
...
...
This diff is collapsed.
Click to expand it.
gajim/gtk/ssl_error_dialog.py
+
1
−
1
View file @
47bf21d2
...
...
@@ -80,4 +80,4 @@ def _on_connect_clicked(self, _button):
app
.
cert_store
.
add_certificate
(
self
.
_cert
)
self
.
destroy
()
self
.
_con
.
process_
ssl
_errors
()
self
.
_con
.
process_
tls
_errors
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment