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: 

SSL Certificates

I am trying to use a "roUrlTransfer" object for a url similar to https://blahblahblah.com:8443/blahblbah

I have tried to follow the component documentation and have done the following

Http.SetCertificatesFile("pkg:/certs/cert.pem")
Http.AddHeader("X-Roku-Reserved-Dev-Id", "")
Http.InitClientCertificates()
Http.gettostring()

where the cert.pem is the cert that came with the dev kit.

The Http.gettostring() returns nothing.

Is there something I am missing here?

Thanks,

George
0 Kudos
1 REPLY 1
RokuKevin
Visitor

Re: SSL Certificates

I would check the installation of your server-side certificate first. You can do this with curl from a command line on your workstation:

curl --cacert cert.pem https://yourhost.domain.com/yourURL.htm

cert.pem is the same file you included in your .pkg at /certs/cert.pem, but copied to the current directory on your workstation. cert.pem must include the CA cert of your web server.

Note that firmware v2.6 and later includes a CA cert bundle in the common: device that includes common Certificate Authorities trusted by FireFox. If you got your server cert from one of these authorities, you can use "common:/certs/ca-bundle.crt" instead of "pkg:/certs/cert.pem".

The Http.AddHeader("X-Roku-Reserved-Dev-Id", "") and Http.InitClientCertificates() have been covered in previous forum post. I'll refer you to that post if you desire implementing this content protection scheme: http://forums.roku.com/viewtopic.php?f=34&t=27562&p=171752&hilit=SSL#p171752

I'm sure you did it already, but your code also has to specify the URL:


http = CreateObject("roUrlTransfer")
http.SetPort(CreateObject("roMessagePort"))
http.SetUrl(url)
http.SetCertificatesFile("pkg:/certs/cert.pem")
response = http.GetToString()
0 Kudos