Hi,
i need to access websites from my oracle 12c database via pl/sql. it works fine for google and many other ssl and non-ssl sites. But i am having huge trouble with yahoo. I want to get realtime stock data and for that, i need to store the yahoo cert in my wallet. I did that (like with google and redhat cert). But whatever i do, i am getting this error: ORA-29024: Certificate validation failure. It seems like, that there is some kind of forwarding (a friend told me) and that maybe pl/sql can't resolve that forwarding. Im using this code that i found on the internet and works fine with google. DOes anyone maybe got an idea, why i get this ORA-29024 error especially in combination with yahoo? (Im using Oracle 12c in a vm with windows server 2012. No proxy server, firewall disabled).
Thank you for your help and understanding.
create or replace PROCEDURE show_html_from_url (p_url IN VARCHAR2,
p_username IN VARCHAR2 DEFAULT NULL,
p_password IN VARCHAR2 DEFAULT NULL) AS
l_http_request UTL_HTTP.req;
l_http_response UTL_HTTP.resp;
l_text VARCHAR2(32767);
BEGIN
-- Make a HTTP request and get the response.
l_http_request := UTL_HTTP.begin_request(p_url);
-- Use basic authentication if required.
IF p_username IS NOT NULL and p_password IS NOT NULL THEN
UTL_HTTP.set_authentication(l_http_request, p_username, p_password);
END IF;
l_http_response := UTL_HTTP.get_response(l_http_request);
-- Loop through the response.
BEGIN
LOOP
UTL_HTTP.read_text(l_http_response, l_text, 32766);
DBMS_OUTPUT.put_line (l_text);
END LOOP;
EXCEPTION
WHEN UTL_HTTP.end_of_body THEN
UTL_HTTP.end_response(l_http_response);
END;
EXCEPTION
WHEN OTHERS THEN
UTL_HTTP.end_response(l_http_response);
RAISE;
END show_html_from_url;