Forum Discussion

ahujace's avatar
ahujace
Visitor
10 years ago

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

4 Replies

  • 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
  • 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 
  • "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")
  • "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?