I got this working on SA12 and SA16, but some of out clients still use SA11 and in there it does not work neither using the root sertificate nor the ones I found on United Nations website.
I need to get UN Blacklist XML periodically, same as Kumar back in 2009, however since 2015-10-14 UN website requires a certificate so I specify certificate like this:
CREATE OR REPLACE FUNCTION "DBA"."UNBlacklist"()
RETURNS LONG VARCHAR
where instead of
!cert I put Base-64 encoded certificate string that I got from UN site using Google Chrome or the root certificate I got from COMODO, I get the following error on SQL Anywhere version 18.104.22.16869 and 22.214.171.12458:
Invalid response from the HTTP server
SQLCODE=-988, ODBC 3 State="HY000"
However it works using versions 126.96.36.19931 and 188.8.131.527 if root certificate from COMODO is provided.
Log file says this:
[connid = 20, 12/28 11:57:39.648]
[connid = 20, 12/28 11:57:39.648, REQUEST]
GET /sc/resources/files/consolidated.xml HTTP/1.0
Accept-Charset: windows-1257, UTF-8, *
Date: Mon, 28 Dec 2015 09:57:39 GMT
[connid = 20, Error: socket closed by peer]
[connid = 20, socket closed]
28 Dec '15, 07:37