Skip to content

Commit

Permalink
updated disable ssl label
Browse files Browse the repository at this point in the history
  • Loading branch information
Samweli authored and nyalldawson committed Jun 5, 2020
1 parent 94106dc commit c22d429
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions python/plugins/MetaSearch/dialogs/maindialog.py
Expand Up @@ -97,7 +97,7 @@ def __init__(self, iface):
self.startfrom = 0
self.maxrecords = 10
self.timeout = 10
self.disable_ssl = False
self.disable_ssl_verification = False
self.constraints = []

# Servers tab
Expand Down Expand Up @@ -449,9 +449,6 @@ def search(self):
# set timeout
self.timeout = self.spnTimeout.value()

# ssl mode
self.disable_ssl = self.disableSSL.isChecked()

# bbox
# CRS is WGS84 with axis order longitude, latitude
# defined by 'urn:ogc:def:crs:OGC:1.3:CRS84'
Expand Down Expand Up @@ -831,10 +828,12 @@ def show_metadata(self):

identifier = get_item_data(item, 'identifier')

self.disable_ssl_verification = self.disableSSLVerification.isChecked()

try:
with OverrideCursor(Qt.WaitCursor):
auth = None
if self.disable_ssl:
if self.disable_ssl_verification:
auth = Authentication(verify=False)
cat = CatalogueServiceWeb(self.catalog_url, timeout=self.timeout, # spellok
username=self.catalog_username,
Expand Down Expand Up @@ -914,10 +913,12 @@ def reject(self):
def _get_csw(self):
"""convenience function to init owslib.csw.CatalogueServiceWeb""" # spellok

self.disable_ssl_verification = self.disableSSLVerification.isChecked()

# connect to the server
with OverrideCursor(Qt.WaitCursor):
auth = None
if self.disable_ssl:
if self.disable_ssl_verification:
auth = Authentication(verify=False)
try:
self.catalog = CatalogueServiceWeb(self.catalog_url, # spellok
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/MetaSearch/ui/maindialog.ui
Expand Up @@ -501,12 +501,12 @@
<item row="1" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Disable SSL</string>
<string>Disable SSL verification</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="disableSSL">
<widget class="QCheckBox" name="disableSSLVerification">
<property name="text">
<string/>
</property>
Expand Down

0 comments on commit c22d429

Please sign in to comment.