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: 
ahujace
Visitor

Trace HTTPS api calls for Roku app in Charles

Hi Guys,

I am using Charles proxy to validate server endpoints for Roku app. My app contains https calls which are not coming in charles.
To view https calls it is required to install charles certificate on device.

Does any one know how to install charles https certificate for Roku or is there any way to track https api calls for Roku app

I have used below link to configure charles with Roku device:
viewtopic.php?p=491365
0 Kudos
4 REPLIES 4
RokuJoel
Binge Watcher

Re: Trace HTTPS api calls for Roku app in Charles

Try using object.SetCertificatesFile("pkg:/myCharlesCertificateFile.crt") - you can do this with any component that implements ifHttpAgent

so a videoplayer object:

vid=createobject("RoVideoPlayer")
vid.SetCertificatesFile("pkg:/myCharlesCertificateFile.crt")

- Joel
0 Kudos
ankur275
Visitor

Re: Trace HTTPS api calls for Roku app in Charles

Hi ahujace,

Could you get it working using RokuJoel's suggestion? I wonder if there is way to do it not at a code level. 
For example, AppleTV let's you add a 'Profile' which is the Charles certificate and then you can see SSL calls. 

Thanks,
Ankur 
0 Kudos
Pradeepa
Visitor

Re: Trace HTTPS api calls for Roku app in Charles

"RokuJoel" wrote:
Try using object.SetCertificatesFile("pkg:/myCharlesCertificateFile.crt") - you can do this with any component that implements ifHttpAgent

so a videoplayer object:

vid=createobject("RoVideoPlayer")
vid.SetCertificatesFile("pkg:/myCharlesCertificateFile.crt")

- Joel

We exported the Charles certifcate (myCharlesCertificateFile.pem) from charles and imported the certificate in code as below but it didn't work for us. Do you have any inputs?
vid=createobject("roUrlTransfer")
vid.SetCertificatesFile("pkg:/rokuDefaultCertificate.pem")
vid.SetCertificatesFile("pkg:/myCharlesCertificateFile.pem")
0 Kudos
belltown
Roku Guru

Re: Trace HTTPS api calls for Roku app in Charles

"Pradeepa" wrote:
We exported the Charles certifcate (myCharlesCertificateFile.pem) from charles and imported the certificate in code as below but it didn't work for us. Do you have any inputs?
vid=createobject("roUrlTransfer")
vid.SetCertificatesFile("pkg:/rokuDefaultCertificate.pem")
vid.SetCertificatesFile("pkg:/myCharlesCertificateFile.pem")

I don't see why you have two calls to SetCertificatesFile. Only the last call will have any effect. There can only be one certificates file. The standard Roku certificate bundle, contained in common:/certs/ca-bundle.crt, contains certificates for well-known trusted certificate authorities. What you need to do is create a bundle that has the common list of CAs, but with your Charles Proxy root CA certificate APPENDED to the standard list, all in one file. Pass that filename to SetCertificatesFile. Also, take a look at the format of the certificate entries in common:/certs/ca-bundle.crt and ensure your Charles certificate is in the same format.

If it still doesn't work, be more specific about what you mean when you say it "didn't work". What error did you get, and where did you get this error, and what calls are you using to communicate via your roUrlTransfer object?
0 Kudos