Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
poezio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maxime Buquet
poezio
Commits
c76279c3
Verified
Commit
c76279c3
authored
Dec 17, 2014
by
mathieui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle invalid certificate chains (with the ca_cert_path option)
parent
ef3beab0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
src/core/core.py
src/core/core.py
+2
-0
src/core/handlers.py
src/core/handlers.py
+4
-0
No files found.
src/core/core.py
View file @
c76279c3
...
...
@@ -253,6 +253,7 @@ class Core(object):
self
.
on_chatstate_inactive
)
self
.
xmpp
.
add_event_handler
(
"attention"
,
self
.
on_attention
)
self
.
xmpp
.
add_event_handler
(
"ssl_cert"
,
self
.
validate_ssl
)
self
.
xmpp
.
add_event_handler
(
"ssl_invalid_chain"
,
self
.
ssl_invalid_chain
)
self
.
all_stanzas
=
Callback
(
'custom matcher'
,
connection
.
MatchAll
(
None
),
self
.
incoming_stanza
)
...
...
@@ -1957,6 +1958,7 @@ class Core(object):
outgoing_stanza
=
handlers
.
outgoing_stanza
incoming_stanza
=
handlers
.
incoming_stanza
validate_ssl
=
handlers
.
validate_ssl
ssl_invalid_chain
=
handlers
.
ssl_invalid_chain
on_next_adhoc_step
=
handlers
.
on_next_adhoc_step
on_adhoc_error
=
handlers
.
on_adhoc_error
cancel_adhoc_command
=
handlers
.
cancel_adhoc_command
...
...
src/core/handlers.py
View file @
c76279c3
...
...
@@ -1156,6 +1156,10 @@ def incoming_stanza(self, stanza):
self
.
current_tab
().
refresh
()
self
.
doupdate
()
def
ssl_invalid_chain
(
self
,
tb
):
self
.
information
(
'The certificate sent by the server is invalid.'
,
'Error'
)
self
.
disconnect
()
def
validate_ssl
(
self
,
pem
):
"""
Check the server certificate using the slixmpp ssl_cert event
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment