|
Re: ORA 12545 | UTL_HTTP [message #685351 is a reply to message #685350] |
Wed, 15 December 2021 07:12   |
John Watson
Messages: 8805 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
It works for me:orclz>
orclz> SELECT utl_http.request('https://gb.redhat.com',wallet_path=>'file:c:\tmp\wallet') from dual;
UTL_HTTP.REQUEST('HTTPS://GB.REDHAT.COM',WALLET_PATH=>'FILE:C:\TMP\WALLET')
-------------------------------------------------------------------------------------------------------------------------------------------------------
<!DOCTYPE html>
<!--[if IE 8]><html lang="en" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en" class="no-js"> <!--<![endif]--> Which certificate did you load into the wallet? You need only one, the root certificate for DigiCert High Assurance EV Root CA
|
|
|
|
Re: ORA 12545 | UTL_HTTP [message #685355 is a reply to message #685353] |
Thu, 16 December 2021 03:20   |
John Watson
Messages: 8805 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
I think it is a problem with release 12.2.0.1:orclz>
orclz> select * from v$version;
BANNER
--------------------------------------------------------------------------------
BANNER_FULL
-----------------------------------------------------------------------------------------------------------------------------------------
BANNER_LEGACY CON_ID
-------------------------------------------------------------------------------- ---------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production 0
orclz> SELECT utl_http.request('https://gb.redhat.com',wallet_path=>'file:c:\tmp\wallet') from dual;
UTL_HTTP.REQUEST('HTTPS://GB.REDHAT.COM',WALLET_PATH=>'FILE:C:\TMP\WALLET')
-----------------------------------------------------------------------------------------------------------------------------------------
<!DOCTYPE html>
<!--[if IE 8]><html lang="en" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
127.0.0.1:1521/orclxpdb>
127.0.0.1:1521/orclxpdb> select * from v$version;
BANNER CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production 0
PL/SQL Release 12.2.0.1.0 - Production 0
CORE 12.2.0.1.0 Production 0
TNS for 64-bit Windows: Version 12.2.0.1.0 - Production 0
NLSRTL Version 12.2.0.1.0 - Production 0
127.0.0.1:1521/orclxpdb> SELECT utl_http.request('https://gb.redhat.com',wallet_path=>'file:c:\tmp\wallet') from dual;
SELECT utl_http.request('https://gb.redhat.com',wallet_path=>'file:c:\tmp\wallet') from dual
*
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1501
ORA-28750: unknown error
ORA-06512: at "SYS.UTL_HTTP", line 651
ORA-06512: at "SYS.UTL_HTTP", line 1443
ORA-06512: at line 1 Your old release probably can't understand the cipher suite the certificate uses. You'll have to upgrade, 12.2.0.1 went out of premier support a year ago.
|
|
|
Re: ORA 12545 | UTL_HTTP [message #685385 is a reply to message #685355] |
Mon, 20 December 2021 03:32  |
 |
vippysharma
Messages: 73 Registered: May 2013 Location: www
|
Member |
|
|
there is one workaround, it is working fine for me...
I have tried to call SENDGRID api, followed below steps...
1. Download certificates and loaded to oracle wallet.
2. Create ACL and then Assign to host.
3. Added Privileges to ACL.
4. Assign wallet to ACL using dbms_network_acl_admin.assign_wallet_acl.
5. EXEC UTL_HTTP.set_wallet('file:/u01/app/oracle/admin/DBName/wallet', '***WalletPwD**');
6. Now execute final SQL and https_Host (CN name) should be mandatory else error will be there.
select utl_http.request(url => 'https://api.sendgrid.com/v3/mail/send',
wallet_path => 'file://u01/app/oracle/admin/DBName/wallet',
wallet_password => '***WalletPwD**',
https_host => '*.api.sendgrid.com'
) resp
from dual;
RESP
--------------
{"errors":[{"message":"POST method allowed only","field":null,"help":null}]}
|
|
|