Page 1 of 2

Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Sun Jan 13, 2019 2:12 pm
by ZachBenz
Hi all,

I have a control page set up with a Refreshing Image URL pointing to a continuously refreshing image from a SecuritySpy camera, with SecuritySpy set up to serve a web interface - port 8001 for HTTP, and 8002 for HTTPS

e.g, the URL is something like:
http://username:password@127.0.0.1:8001 ... t=1080&401

With the refresh rate set to Continuous and the Image Size set to 1920x1080.

And this works great.

Now, if I instead use an https connection:
https://username:password@127.0.0.1:800 ... t=1080&401

I see errors in the Indigo log:
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>

The problem being that SecuritySpy uses a self-signed certificate.

I don't see an obvious way to either disable the certificate check for the Refreshing Image URL or to permanently add the self-signed certificate as trusted (it is already trusted at the system level via the macOS Keychain, but that trust chain doesn't appear to be used by Indigo). Is there a way to do either? I'd like to only run the SecuritySpy HTTPS server, and disable the HTTP one.

Re: Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Thu Aug 13, 2020 2:26 pm
by Different Computers
Looks like I'm not the first person with this problem. But no answers.

Re: Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Mon Aug 24, 2020 10:06 am
by jroach
I'm new to this and run the risk of replying with something obvious or stupid but WTH.

There is some info on certs and SS here:

https://www.bensoftware.com/securityspy/helpfaq.html

If the plugin-in didn't consider some security changes that might have been made along the way... maybe this is the smoking gun:

https://medium.com/@moreless/how-to-fix ... 772d9dd14c

Re: Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Tue Aug 25, 2020 5:15 pm
by matt (support)
If you are up for trying to hack in a change to have Indigo skip cert validation, then open the file /Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoWebServer/indigopy/indigoreqhandler.py in a raw text editor (TextWrangler, BBEdit, etc.) and:

around line 42, after:

Code: Select all
import socket

add:

Code: Select all
import ssl

and around line 455 replace line:

Code: Select all
                  result = urllib2.urlopen(imageReq)

with:

Code: Select all
                  result = urllib2.urlopen(imageReq, context=ssl._create_unverified_context())

I recommend making a backup of the file before your change, and if the change works makes a backup of the changed file. Future versions of the Indigo installer might overwrite your change. Be sure and stop and restart the Indigo Server before testing, and let me know if it works.

Re: Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Wed Nov 29, 2023 11:46 am
by McJohn
Code: Select all
   Web Server                      https://api.buienradar.nl/image/1.0/RadarMapNL?w=160&h=120
load error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>


How can we fix this error with Indigo 2022 or higher?

Because that file (IndigoWebServer/indigopy/indigoreqhandler.py) doesn't exist anymore..

Thanks for the hint.

John

Re: Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Wed Nov 29, 2023 4:47 pm
by jay (support)
McJohn wrote:
Code: Select all
   Web Server                      https://api.buienradar.nl/image/1.0/RadarMapNL?w=160&h=120
load error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>


This was fixed in 2023.1 (yes, I know you are having other issues with 2023.1, but this problem at least is fixed).

Re: Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Thu Nov 30, 2023 3:18 am
by McJohn
This is the error with Indigo 2023.1.1 with the same URL:

Web Server Error /web/refreshingimage: no refreshing image URL configured for element 323 on page ''
Web Server Warning HTTP 400 error for request /web/refreshingimage

Re: Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Thu Nov 30, 2023 9:42 am
by jay (support)
That appears to be an unrelated issue - are you sure that you don't have a refreshing image on that particular page that isn't configured correctly?

Re: Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Thu Nov 30, 2023 10:05 am
by McJohn
It was working perfectly for years.

It's only that Refreshing URL:

https://api.buienradar.nl/image/1.0/Rad ... =160&h=120

Refresh rate 30 sec.
Image size 160 x 120

You can try it by yourself and see what happens.

Re: Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Thu Nov 30, 2023 11:16 am
by jay (support)
It is unrelated to the SSL issue, which is what this topic is about.

Re: Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Thu Nov 30, 2023 12:02 pm
by McJohn
OK, and more important:

What's the solution?

Re: Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Thu Nov 30, 2023 12:08 pm
by McJohn
PS; topic says:
"Refreshing Image URL with https/SSL and self-signed cert"

Error in Indigo 2022 says (wit this Refreshing Image URL) :
"<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>

Do we have add another topic for this to get a solution?

Re: Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Thu Nov 30, 2023 12:24 pm
by FlyingDiver
McJohn wrote:
PS; topic says:
"Refreshing Image URL with https/SSL and self-signed cert"

Error in Indigo 2022 says (wit this Refreshing Image URL) :
"<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>

Do we have add another topic for this to get a solution?


You should start a NEW thread for your NEW issue which only happens on 2023.1.

Re: Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Thu Nov 30, 2023 12:31 pm
by McJohn
OK, no problem if that gives a solution...

(But our original question was about this problem in Indigo 2022. NOT in Indigo 2023 and the subject of this thread doesn't say a difference between 2022 and 2023)

Sorry that we don't have made a new thread for the same URL in Indigo 2023....

Re: Refreshing Image URL with https/SSL and self-signed cert

PostPosted: Thu Nov 30, 2023 12:43 pm
by FlyingDiver
McJohn wrote:
Sorry that we don't have made a new thread for the same URL in Indigo 2023....


It may be the same URL but it is NOT the same problem. The error messages are totally different.