0
votes

I'm running Oracle 18c XE on Windows server

I'm trying to connect to some https urls. Let's say Google.com :

URL := 'https://www.google.com/' 
apex_web_service.make_rest_request(p_url => URL, p_http_method => 'GET'); 

I'm getting the error :

ORA-29273: HTTP request failed
ORA-06512: at "APEX_190200.WWV_FLOW_WEB_SERVICES", line 1283
ORA-06512: at "APEX_190200.WWV_FLOW_WEB_SERVICES", line 924
ORA-29024: Certificate validation failure

Here the steps I did :

  • I created a Wallet using Oracle Wallet Manager, I downloaded the certificate from Google.com in P7B format and I put it in the wallet folder.

enter image description here

  • EXEC UTL_HTTP.set_wallet(':D:\Oracle\MyWalletFolder', 'Password');

But when trying to connect, I'm still having the same issue :

URL := 'https://www.google.com/' 
apex_web_service.make_rest_request(p_url => URL, p_http_method => 'GET'); 

Can anyone help please ?

Thanks.

1

1 Answers

2
votes

2 things (+1 more in the edit):

1, The wallet path needs 'file:'

EXEC UTL_HTTP.set_wallet('file:D:\Oracle\MyWalletFolder', 'Password');

2, The wallet should not contain the actual certificate, but should contain it's roots/intermediates. Oracle throws errors when the wallet contains the end-domain certificate.

3, I am pretty certain apex rest calls will use the certificate setup from the apex config itself:

begin
APEX_INSTANCE_ADMIN.SET_PARAMETER('WALLET_PATH','file:D:\Oracle\MyWalletFolder');
APEX_INSTANCE_ADMIN.SET_PARAMETER('WALLET_PWD','Password');
APEX_INSTANCE_ADMIN.SET_PARAMETER('MAX_WEBSERVICE_REQUESTS','10000000');
end;
/