OK I found the problem. The certificate hostname comparison check on Roku OS components is case sensitve, so SSL handshake was failing in case of Roku OS components. However roUrlTransfer (curl) was ignoring case.
The developer can workaround this issue by using same host name in URL as in cert... i.e. Servername instead of servername. I have verified this.