Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Network Health
sbws
Commits
62b62ea4
Commit
62b62ea4
authored
Dec 08, 2018
by
juga
Browse files
destination: add constant to verify destination
certificate by default.
parent
c2b85b3f
Changes
2
Hide whitespace changes
Inline
Side-by-side
sbws/globals.py
View file @
62b62ea4
...
...
@@ -53,6 +53,8 @@ MAX_BW_DIFF_PERC = 50
BW_LINE_SIZE
=
510
DESTINATION_VERIFY_CERTIFICATE
=
True
def
fail_hard
(
*
a
,
**
kw
):
''' Log something ... and then exit as fast as possible '''
...
...
sbws/lib/destination.py
View file @
62b62ea4
...
...
@@ -6,6 +6,8 @@ from threading import RLock
import
requests
from
urllib.parse
import
urlparse
from
stem.control
import
EventType
from
sbws.globals
import
DESTINATION_VERIFY_CERTIFICATE
import
sbws.util.stem
as
stem_utils
import
sbws.util.requests
as
requests_utils
...
...
@@ -14,7 +16,7 @@ log = logging.getLogger(__name__)
def
_parse_verify_option
(
conf_section
):
if
'verify'
not
in
conf_section
:
return
True
return
DESTINATION_VERIFY_CERTIFICATE
try
:
return
conf_section
.
getboolean
(
'verify'
)
except
ValueError
:
...
...
Write
Preview
Supports
Markdown
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