I am calling UTL_HTTP to make a HTTPS Rest API call
I followed the steps in https://oracle-base.com/articles/misc/utl_http-and-ssl and created the wallet, and then copied the ewallet.p12 file over to a location on the DB server (exadata). I gave it a permission of 775.
I then used the below code to make the call to the https site and it throws ORA-29106: Cannot import PKCS #12 wallet. everytime ORA-29106: Cannot import PKCS #12 wallet.
set serveroutput on size 1000000
declare
req utl_http.req;
res utl_http.resp;
url varchar2(4000) := 'https://mysite/sit';
begin
utl_http.set_detailed_excp_support(true);
UTL_HTTP.set_wallet('file:/u01/app/oracle/','###');
req := utl_http.begin_request(url ) ;
--UTL_HTTP.set_authentication(req, null, null);
end;
/***
Error report -
ORA-29106: Cannot import PKCS #12 wallet.
ORA-06512: at "SYS.UTL_HTTP", line 380
ORA-06512: at "SYS.UTL_HTTP", line 1148
ORA-06512: at line 12
29106. 00000 - "Cannot import PKCS #12 wallet."
*Cause: A required parameter is NULL or the BER-encoding is malformed.
*Action: Enable tracing and attempt the connection again. Contact
Oracle customer support with the trace output.
***/
Tried the below , but it throws ORA-29106 everytime :
1. changing the wallet location from a NFS mounted folder to a local folder
2. Adding root and intermediate certificates to the wallet
3. When creating the wallet with orapki , tried creating with auto_login and without auto_login
4. receiving this error when the wallet is empty (that is above code run after wallet creation and before certificate add)
I get the same error with APEX_WEB_SERVICE.make_rest_request error as well.
Database is on 19c (upgraded from 12c), and regular HTTP call works fine.
Certificate Signature algorithm says sha256RSA and Signature hash algorithm says sha256