mortenbra / alexandria-plsql-utils

Oracle PL/SQL Utility Library
778 stars 316 forks source link

ORA-24263: Certificate Error using slack_util_pkg on 12.2 #51

Open ajkruse opened 6 years ago

ajkruse commented 6 years ago

When using slack_util_pkg on 12.2 I get the following error when trying to SEND_MESSAGE ORA-24263: Certificate of the remote server does not match the target address.

Did some research to find: https://asktom.oracle.com/pls/apex/f?p=100:11:::NO:RP:P11_QUESTION_ID:9536564700346663150

SOLUTION 

As of Oracle 12.2 the procedures of the utl_http package used to access remote webservices have a new parameter called https_host. One has to use this new parameter to avoid the error: 

For 12.2 the following can be added to slack_util_pkg as a fix/workaround g_https_host string_util_pkg.t_max_db_varchar2 := 'slack.com'; ... , p_https_host => g_https_host ...

mortenbra commented 6 years ago

Thanks @ajkruse for pointing this out. As further explained in this post (http://lschilde.blogspot.no/2018/01/oracle-apex-and-122-upgrade.html) the p_https_host parameter was added to apex_web_service.make_rest_request in APEX version 5.1.4. So if you are on Oracle 12.2 you also need to upgrade to APEX 5.1.4 to be able to add this parameter.

Leaving this issue open as an enhancement for now.