Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

UTL_HTTP - HTTPS REST Webservice call - ORA-29106

User_AJCYGSep 8 2021 — edited Sep 8 2021

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.

set serveroutput on size 1000000declare   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 380ORA-06512: at "SYS.UTL_HTTP", line 1148ORA-06512: at line 1229106. 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

Comments
Post Details
Added on Sep 8 2021
1 comment
1,137 views