Romans_I_XVI
9 years agoRoku Guru
Is using cacert.pem from the legacy SDK still the appropriate method?
So I have no knowledge of web security and certificates, but I attempted to follow the somewhat vague directions on the roUrlTransfer documentation page.
https://sdkdocs.roku.com/display/sdkdoc/roUrlTransfer
To set up my server I used the instructions found here. - https://matoski.com/article/node-express-generate-ssl/ - Except I swapped in the cacert.pem from the old SDK - https://image.roku.com//www/static/sdk/RokuSDK.zip -
Then I call this for all of my url transfers.
I have to have the peer verification to false or I get this error.
I don't know if that matters that it is set to false, or for that matter if host verification needs to be set to true. But it appears that everything is working. If you try to request data from my website outside of the Roku box it declines you with an SSL error, and within my app on the Roku it works fine.
I guess one of the big things I'm asking about is if this system is still the safe and correct system to use, considering I'm using a file from the SDK that is now marked as legacy, and the only instructions I can find about it from within Roku is a forum post by RokuKevin from 2010 - https://forums.roku.com/viewtopic.php?p ... ccb45e1c8a
Any thoughts would be great, and hey if you want to try to break in to my server that'd be great too. Here's an example of a request that the app would make.
https://74.91.115.18:3000/getLevel?level_id=1100
Thanks
https://sdkdocs.roku.com/display/sdkdoc/roUrlTransfer
To set up my server I used the instructions found here. - https://matoski.com/article/node-express-generate-ssl/ - Except I swapped in the cacert.pem from the old SDK - https://image.roku.com//www/static/sdk/RokuSDK.zip -
Then I call this for all of my url transfers.
function AddHeaders(URLTransfer as Object)
URLTransfer.AddHeader("Content-Type", "application/json")
URLTransfer.AddHeader("X-Roku-Reserved-Dev-Id", "")
URLTransfer.SetCertificatesFile("common:/certs/ca-bundle.crt")
URLTransfer.EnablePeerVerification(false)
URLTransfer.EnableHostVerification(true)
URLTransfer.InitClientCertificates()
end function
I have to have the peer verification to false or I get this error.
BrightScript Debugger> print msg.getfailurereason()
SSL certificate problem: self signed certificate
I don't know if that matters that it is set to false, or for that matter if host verification needs to be set to true. But it appears that everything is working. If you try to request data from my website outside of the Roku box it declines you with an SSL error, and within my app on the Roku it works fine.
I guess one of the big things I'm asking about is if this system is still the safe and correct system to use, considering I'm using a file from the SDK that is now marked as legacy, and the only instructions I can find about it from within Roku is a forum post by RokuKevin from 2010 - https://forums.roku.com/viewtopic.php?p ... ccb45e1c8a
Any thoughts would be great, and hey if you want to try to break in to my server that'd be great too. Here's an example of a request that the app would make.
https://74.91.115.18:3000/getLevel?level_id=1100
Thanks