-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Hi. The muxpi connector currently supports requesting a URL during provisioning to determine if the device is alive. Would it be possible to allow this to work with HTTPS ?
The current connector code appears to be:
try:
with urllib.request.urlopen(
boot_check_url, timeout=5
) as response:
if response.status == 200:
return True
logger.info(
"Check returned %d, expecting 200", response.status
)
except urllib.error.URLError as e:
logger.info("Boot check failed with %s", e)It looks like supplying an SSL context should fix it. Specifically, I do not want the device TLS certificate or hostname to be verified, to support different TLS schemes which may not rely on externally signed certificates.
import urllib2
import ssl
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
urllib2.urlopen("https://your-test-server.local", context=ctx)Does this sound like a doable request ? I assume that supplying an SSL context does not prevent HTTP.
Metadata
Metadata
Assignees
Labels
No labels