Hi Guys
I am having the same problem
-77
error setting certificate verify locations:
CAfile: /tmp/plugin/BEAAAA8IJGIU/pkg:/certs/cacert.crt
CApath: none
Our cert bundle includes the CA certs that FireFox trusts. If you call SetCertificatesFile() and pass the bundle it will usually enable SSL communication...
Where would I get the CA certs file from. I have a cacert.pem file from the ROKU SDK and used openssl to convert it to cacert.crt and used this in the code as well. But still getting the error.
It looks like the difference in the NewHttp call made all the difference. Thanks for the offer to look into it!
Can you clarify what is the NewHttp call that made difference for you?
Below is my code, which I have been currently testing by placing it in the Main function. I am trying to get the list of items from the server using the provided server API with its username and password. Any help would be much appreciated.
http = CreateObject("roUrlTransfer")
port = CreateObject("roMessagePort")
http.SetUrl("https://someserver/playlist")
http.SetMessagePort(port)
ba = CreateObject("roByteArray")
ba.FromAsciiString("username:password")
http.AddHeader("Authorization", "Basic " + ba.ToBase64String())
http.AddHeader("Content-Type", "application/json")
'http.AddHeader("X-Roku-Reserved-Dev-Id", "")
http.SetCertificatesFile("pkg:/certs/cacert.crt")
http.InitClientCertificates()
http.RetainBodyOnError(true)
num_tries = 1
while num_tries > 0
if (http.AsyncGetToString()) 'AsyncPostFromString("")
event = wait(0, http.GetPort())
if type(event) = "roUrlEvent"
dd = event.GetString()
code = event.GetResponseCode()
st = event.GetFailureReason()
print code; "--------"
print st; "&&&&&&&&&&&"
num_tries = num_tries -1
end if
end if
end while