Closed Bug 1013325 Opened 10 years ago Closed 10 years ago

[roku] add call to init SSL certs for video player

Categories

(Firefox for Android Graveyard :: Screencasting, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mfinkle, Unassigned)

Details

Attachments

(1 file)

Attached patch video-cert v0.1Splinter Review
We ship some default videos in "Recent History" and I noticed they were not working. Failing with "Unspecified or invalid track path/url" message.

I realized the videos were from an HTTPS source and discovered we needed to tell the video player about SSL certs to get the HTTPS GET to work.

The patch also updates the default videos to use HTTPS urls and skip the redirect.
Attachment #8425537 - Flags: review?(wjohnston)
I am blocked on releasing the Roku app for this patch. Let me know if you want me to get a different reviewer.
Comment on attachment 8425537 [details] [diff] [review]
video-cert v0.1

Review of attachment 8425537 [details] [diff] [review]:
-----------------------------------------------------------------

Looking at roku example code, I think we might need a bit more (but its a simple change). Maybe you know why they're not needed here though? Feel free to carry the r+ if you make the change.

::: app/json/defaults.json
@@ +13,1 @@
>  	}            

might as well remove this ws.

::: app/source/video.brs
@@ +18,4 @@
>      this.canvas.show()
>  
>      this.player.setMessagePort(this.port)
> +    this.player.setCertificatesFile("common:/certs/ca-bundle.crt")

Every example of this I see also calls player.InitClientCertificates() after setting. Most of them also set a header:

video.Addheader("x-roku-reserved-dev-id","")
video.SetCertificatesFile("pkg:/source/testCA.CRT")
video.InitClientCertificates()
Attachment #8425537 - Flags: review?(wjohnston) → review+
(In reply to Wesley Johnston (:wesj) from comment #2)

> Looking at roku example code, I think we might need a bit more (but its a
> simple change). Maybe you know why they're not needed here though? Feel free
> to carry the r+ if you make the change.

> Every example of this I see also calls player.InitClientCertificates() after
> setting. Most of them also set a header:
> 
> video.Addheader("x-roku-reserved-dev-id","")
> video.SetCertificatesFile("pkg:/source/testCA.CRT")
> video.InitClientCertificates()

InitClientCertificates() should only be needed if we use a custom certificate, if I understand things correctly. Using the built-in cert might not need the init. I did test with and without, and SetCertificatesFile was all that was needed to get the videos to work.

The header is only needed if you want to send "Firefox" (the id of the application/channel) to the webserver, which we do not.
https://github.com/mozilla/firefox-roku/commit/7bfb510e9d1c5c89767322fa85f07261bd20175b
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: