Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jbrave
Level 8

SSL and untrusted certs

I'm having trouble retrieving images in a posterscreen from an SSL server. If I try to load the URL in Firefox, I get an "This Connection is Untrusted" message. For loading data from the website, I got around this with

enableHostVerification(false)


How can I accept the self signed cert of this server the way I do in firefox?

- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
5 Replies
RokuKevin
Level 9

Re: SSL and untrusted certs

You must include the CA cert in a PEM file in your package and pass it to the ifHttpAgent interface SetCertificatesFile() on the poster screen.

--Kevin
0 Kudos
jbrave
Level 8

Re: SSL and untrusted certs

Is there a way to download the .pem file from the server (since every user will be running his/her own server) and install it using rourltransfer?

- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
RokuKevin
Level 9

Re: SSL and untrusted certs

That's not advisable.... you'd be violating user's faith in your app. You should find a solution that sets up proper chains of trust. If you use the same CA cert to sign different server's certs you only need to include the CA cert in the channel.

--Kevin
0 Kudos
jbrave
Level 8

Re: SSL and untrusted certs

Ok, so what is the procedure for downloading the cert from the website? I just tried exporting the cert from firefox as a .pem and using that, both as "X.509 certificate" and "X.509 Certificate with Chain", then renaming the resulting file from *.server.org" to server.pem

So far, this isn't working.

Any suggestions?

- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
RokuKevin
Level 9

Re: SSL and untrusted certs

This post explains how to create the PEM file:

viewtopic.php?f=34&t=27562&p=262662&hilit=+google#p262662

--Kevin
0 Kudos