Forum Discussion

dbulli's avatar
dbulli
Visitor
14 years ago

roURLTransfer issue SSL from GoDaddy (wildcard)

I am not having any success with a .pem, that has a wild card common name *.DOMAIN.COM. I am trying to connect to "https://lab.DOMAIN.com" and I am getting no response?

xfer = CreateObject("roURLTransfer")
xfer.SetURL('https://lab.DOMAIN.com/somescript'))
xfer.AddHeader("X-Roku-Reserved-Dev-Id", "")
xfer.SetCertificatesFile("pkg:/cert/DOMAIN.pem")
xfer.InitClientCertificates()
response = xfer.GetToString()

print "Failure Reason: " + xfer.GetFailureReason()
print "Response: " + response


Both "Failure Reason" and "Response" are coming back empty, and when I hit from a browser I get the a Response.

Anyone has any ideas?

Thanks

2 Replies

  • If you want to get more data back about what is going on, use the AsyncGetTostring() function in combination with a message port.

    - Joel
  • Thanks Joel,

    Here is what I tried

      
    http = CreateObject("roUrlTransfer")
    port = CreateObject("roMessagePort")
    url = 'https://abc.DOMAIN.com/blah'
    http.SetPort(port)
    http.SetCertificatesFile("pkg:/cert/DOMAIN.pem")
    http.AddHeader("X-Roku-Reserved-Dev-Id", "")
    http.InitClientCertificates()
    http.SetUrl(Url)

    timeout% = 1500
    num_retries% = 10

    while num_retries% > 0
    print "httpget try " + itostr(num_retries%)
    if (http.AsyncGetToString())
    msg = wait(0,port)
    print "message> " + msg.GetString()
    if type(msg) = "roUrlEvent" then
    print "getint"; msg.getint()
    print "getstring"; msg.getstring()
    print "getfailurereason"; msg.getfailurereason()
    print "getresponsecode"; msg.GetResponseCode()
    end if
    end if
    num_retries% = num_retries% - 1
    end while


    And here is the response:

    getfailurereasonerror:14077458:SSL routines:SSL23_GET_SERVER_HELLO:reason(1112)
    getresponsecode-35