How to handle a request with HTTPS protocol in Roku SG while website insecure?

I am working for Roku Scene Graph application, get request data from remote servers specified by URLs but response was not getting and getting error is “SSL: no alternative certificate subject name matches target host name…”. How to request with HTTPS URL while website insecure?
my code for request data is below:-

request = CreateObject("roUrlTransfer")  
request.SetCertificatesFile("common:/certs/ca-bundle.crt")
request.AddHeader("X-Roku-Reserved-Dev-Id", "")
request.InitClientCertificates()
request.SetUrl(url)  
port = CreateObject("roMessagePort")
request.SetMessagePort(port)
request.SetPort(port)    
timer = createobject("roTimeSpan")
request.AsyncGetToString()   
while true    
    msg = wait(10, port)
    if type(msg) = "roUrlEvent" then
        if msg.GetResponseCode() = 200 then
            m.data = msg.GetString()   
            return m.data
            exit while
        else
            print msg.GetResponseCode() 
            print msg.GetFailureReason()
            exit while
        end if        
    end if      
end while

code for download images:-

mgr = CreateObject("roTextureManager")
msgport = CreateObject("roMessagePort")
mgr.SetMessagePort(msgport)

request = CreateObject("roTextureRequest","https://192.168.1.10/ball.png")
request.SetCertificatesFile("common:/certs/ca-bundle.crt")
request.InitClientCertificates()

mgr.RequestTexture(request)

try adding this:

request.enablehostverification(false)
request.enablepeerverification(false)

Thank you :slightly_smiling_face: @tim_beynart ,
Added your code then request data (roUrlTransfer) method working fine, but still download images method is not working. please suggest.

https://forums.roku.com/memberlist.php?mode=viewprofile&u=126532

I have never used roTextureRequest, so I can’t help you there, sorry! Good luck

Would it make more sense to change the requests to http, or to install a self-signed certificate to use HTTPS? As it’s a 192 address it ought to be ok to do either on your development network.