Forum Discussion
belltown
9 years agoRoku Guru
"soporte" wrote:
please someone who realy want help me with this topicHello everyone,
I want to implement ssl and I have this error
Url verifyuser with https gives me this error: data empty
After creating the roUrlTransfer object you need to call SetCertificatesFile on that object, specifying a file containing the certificate chain (bundle) used to verify your server certificate.
If your server certificate is signed by a well-known, trusted certificate authority, then you can use Roku's standard certificate file as follows:
request.SetCertificatesFile("common:/certs/ca-bundle.crt")
If your server certificate is signed by other Root/Intermediate CAs, then you need to supply your own certificate file containing the certificate chain used to verify your server certificate. I'm guessing that in your case it would be the SSLCertificateChainFile: /etc/ssl/ssl.crt/gd_bundle-g2-g1.crt. If so, copy that file into your Roku channel's package directory, e.g. into a folder named certs, and specify the location of the file as follows:
request.SetCertificatesFile("pkg:/certs/gd_bundle-g2-g1.crt")
The bundle file should be in PEM format, i.e. a base-64 encoded text file containing a concatenation of certificates with each certificate surrounded by:
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
Note, you don't need to call InitClientCertificates() unless your server is configured to verify that the requests are coming from an actual Roku device (Client Authentication). If your server does perform this check, then you'd also need to copy the Roku Corp's SDK public key file, cacert.pem, into your server. Similarly, there is no need to call AddHeader("X-Roku-Reserved-Dev-Id") unless your server explicitly needs to check the developer id.