Skip to Main Content

Breadcrumb

May 4th

Question and Answer

Connor McDonald

Thanks for the question, Huy.

Asked: October 27, 2020 - 2:47 am UTC

Last updated: November 20, 2020 - 3:54 am UTC

Version: 20.1.0.00.13

Viewed 1000+ times

You Asked

Hi everyone,
I have one web page name sth like that: ' https://bus/api/check' When I run this web, it returns data normally. But when I create web source module, it shows me as below

An error occurred during URL invocation.

ORA-29024: Certificate validation failure
I search on GG about that problem. I try to solve my problem follow this web:
https://apex.oracle.com/pls/apex/germancommunities/apexcommunity/tipp/6121/index-en.html

It is very cleart. I created new wallet named https_wallet and added certificate successfully. Howerver, I check by select statement on DB, with code:

select APEX_WEB_SERVICE.make_rest_request(p_url => ''https://bus/api/check',p_http_method => 'GET',p_wallet_path => 'file:C:/temp/wallet/https_wallet',p_wallet_pwd => 'pass_word') from dual;


It shows HTTPS request failed and security violation. I don't know why that reason. I tried those steps on Google web, I can get certificate successfully. Now my certificate is from Amazone. I check web via checkssl online, everything it is ok, but I don't understand when I check serial number of the first of certificate, it shows me serial number is 00. Can anyone help me to solve my those problem. I do not have much experience in create web source module. Thank in advance.





Ask about Web Source Module

and Connor said...

Take a look at this post from Tim Hall about getting all the correct pieces in play for certificates to work properly

https://oracle-base.com/articles/misc/utl_http-and-ssl

Rating

  (4 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

continue to get error on https

Huy Nguyen, November 18, 2020 - 1:59 am UTC

Hi everyone,
Your tutorial is very nice. When I try to follow those step, I run it on DB

select apex_web_service.make_rest_request(p_url => 'https://bus.com',
p_http_method => 'GET',p_wallet_path => 'file:C:\oracle\ODB12C\product\12.2.0\dbhome_1\owm\wallets',
p_wallet_pwd => 'my password')
from dual; 


It shows me the result as below:
ORA-29273: HTTP request failed
ORA-06512: at "APEX_200100.WWV_FLOW_WEB_SERVICES", line 1285
ORA-06512: at "APEX_200100.WWV_FLOW_WEB_SERVICES", line 924
ORA-29024: Certificate validation failure
ORA-06512: at "SYS.UTL_HTTP", line 380
ORA-06512: at "SYS.UTL_HTTP", line 1127
ORA-06512: at "APEX_200100.WWV_FLOW_WEB_SERVICES", line 902
ORA-06512: at "APEX_200100.WWV_FLOW_WEB_SERVICES", line 1138
ORA-06512: at "APEX_200100.WWV_FLOW_WEB_SERVICES", line 1475
ORA-06512: at "APEX_200100.WWV_FLOW_WEBSERVICES_API", line 416
ORA-06512: at line 1

View program sources of error stack?

Can you help me clear that? Thank you for your time.

Show my wallet

Huy Nguyen, November 18, 2020 - 2:26 am UTC



I check wallet to show certificate I added to wallet. All of certifications of that web have had in wallet.

C:\oracle\ODB12C\product\12.2.0\dbhome_1\owm\wallets>orapki wallet display -wallet C:\oracle\ODB12C\product\12.2.0\dbhome_1\owm\wallets
Oracle PKI Tool : Version 12.2.0.1.0
Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.

Requested Certificates:
User Certificates:
Trusted Certificates:
Subject: CN=Amazon Root CA 1,O=Amazon,C=US
Subject: CN=Amazon,OU=Server CA 1B,O=Amazon,C=US
Subject: CN=USERTrust RSA Certification Authority,O=The USERTRUST Network,L=Jersey City,ST=New Jersey,C=US
Subject: CN=*.google.com,O=Google LLC,L=Mountain View,ST=California,C=US
Subject: CN=edufit.vn
Subject: CN=Starfield Services Root Certificate Authority - G2,O=Starfield Technologies\, Inc.,L=Scottsdale,ST=Arizona,C=US
Subject: OU=Starfield Class 2 Certification Authority,O=Starfield Technologies\, Inc.,C=US
Subject: CN=Google Internet Authority G3,O=Google Trust Services,C=US
Subject: CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R2
Connor McDonald
November 18, 2020 - 11:59 pm UTC

Are you on 12c database?

If so, check out this MOS note

In Oracle 12c UTL_HTTP Fails With ORA-29024 After Importing WebServer's Certificate into the Oracle Wallet (Doc ID 1682823.1)

Thank you

Huy Nguyen, November 19, 2020 - 7:34 am UTC

Thank you for your help. I am successfully to get https request. I mention that, for oracle 12, select utl_http.request needs an parameter https_host to call API.
Connor McDonald
November 20, 2020 - 3:54 am UTC

glad we could help

Fatal SSL error via utl_http.request

Huy Nguyen, December 04, 2020 - 9:11 am UTC

Hi everyone, my previous case was solved.
Now I have a new problem with a new url which issued from sni.cloudflaressl.com. I select utl_http.request, it shows me fatal ssl error.

I am looking for on GG, there is a way to solve that is applying
the OCT2018 budle patch oracle 11.2 , follow the guide of OS.

But now I use oracle 12.2, it fix any bugs relate to get ssl. I don't understand. I hope you can help me to deal with that. Thank for your time and in advance.

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library