Wednesday, February 17, 2016

Oracle: how to post to https address

The normal way to achieve that is to push the certificates into the Oracle wallet via orapki.
However, if using 11.2.0.1 or XE, this is not feasible because SHA-2 certificates are not supported, and you will get
ORA-29273: HTTP request failed
ORA-06512: at “SYS.UTL_HTTP”, line 1722
ORA-28857: Unknown SSL error
ORA-06512: at line 1
A workaround is to use Apache Reverse Proxy:
Make sure that you have mod_ssl installed, and add into httpd.conf
SSLProxyEngine on
ProxyPass /oneagain https://oneagain.net
ProxyPassReverse /oneagain https://oneagain.net
Then replace:
utl_http.begin_request(‘https://oneagain.net’,’POST’);
with:
utl_http.begin_request(‘http://apache-host/oneagain/’,’POST’);
And forget about the wallet.