Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rcelestino
Visitor

HLS over HTTPS problems

Hi,

We are trying to change our HLS demos in ROKU to a real-scenario where we use HTTPS to get Playlist (Variant/And/Quality) and Keys.

But we get the next error message when we use https:// in Playlists and Key or Any combination of this, but over HTTP it works correctly.
"Known event: 9index:-5 msg: The format is not supported or the media is corrupt."

For this scenario we set:
screen=CreateObject("roVideoScreen")
screen.SetCertificatesFile("common:/certs/ca-bundle.crt")
screen.AddHeader("X-Roku-Reserved-Dev-Id", "")
'screen.InitClientCertificates() 'we comment this line in the last test but this doesnt work too

The certificate of our server was purchased to Thawte, and the certification chain is:
thawte PRimary Root CA \ Thawte SSL CA \ Our Domain

Also we tried the same m3u8/ts/key files over HTTP and it is working correctly.
Also We tried to get the files with #curl over https and also it is working correctly.
Also we tried to set in the metadata Array the m.StreamStickyHttpRedirects=[false,false] 'we use two entries metadata SD, HD. But it didnt work.
Also we tried to use roUrlTransfer to get the same urls then we print in the telnet console the response and this it is working correctly in each urls (https in playlist, https in quality, https in Key). The example code for this purpose is:

http = CreateObject("roUrlTransfer")
http.SetPort(CreateObject("roMessagePort"))
http.SetUrl("https://domain/urls")
http.SetCertificatesFile("common:/certs/ca-bundle.crt")
http.AddHeader("X-Roku-Reserved-Dev-Id", "")
http.InitClientCertificates()
response = http.GetToString()
print "*******************************************************"
print "Debug response:",response
print "*******************************************************"

Any idea? Or Any example that is working with HLS in HTTPs? Or Any Help?

Thanks a Lot!

Roberto.
PS:
The certificate was purchased with the next properties:
Cipher : RC4-MD5
Server public key is 2048 bit
0 Kudos
5 REPLIES 5
rcelestino
Visitor

Re: HLS over HTTPS problems

Also we tried the player with a "un-encrypted wmv" over HTTPS and it didnt work.
Also we tried the player with a "un-encrypted wmv" over HTTP and it is working correctly.

May be we are doing something bad with screen.SetCertificatesFile("common:/certs/ca-bundle.crt")?

Why we can get correctly the response of request over HTTPS using roUrlTransfer?

Thanks a lot.
0 Kudos
RokuKevin
Visitor

Re: HLS over HTTPS problems

Please PM me a link to the stream you are trying to get play, and I'll help you debug the certs setup.

--Kevin
0 Kudos
ryaowe
Visitor

Re: HLS over HTTPS problems

I'm having a very similar problem. Were you able to resolve it? I have an HLS stream that works if I set my key URLs to use http, but not if I use https. The error I get is a very generic "An unexpected problem (but not server timeout or HTTP error) has been detected. index: -3 data: 0"

I'm calling SetCertificatesFile("common:/certs/ca-bundle.crt") on my roVideoScreen instance.

I am also able to manually download the key over https using roUrlTransfer.
0 Kudos
ryaowe
Visitor

Re: HLS over HTTPS problems

screen.SetCertificatesDepth(3) seems to have done the trick for me.
0 Kudos
bmckim
Visitor

Re: HLS over HTTPS problems

I have tried setting the certificate depth, but can not get HLS to play over HTTPS. When making regular HTTPS requests in a separate app I am able to use
video.SetCertificatesFile("common:/certs/ca-bundle.crt") and it works fine. I have also tried my own .pem with both certificates included.

video.SetCertificatesFile("common:/certs/ca-bundle.crt")
'video.SetCertificatesFile("pkg:/source/telvueCA.pem")
video.SetCertificatesDepth(3)
video.InitClientCertificates()
video.SetContent(videoclip)
video.show()


------ Running ------
srt =
SYS LOG: Status: untrustedcert
LogType: http.error
TargetIp: 38.98.246.175
HttpCode: -1
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.