select utl_http.request ('https://olegon.ru/') from dual; ORA-29273: сбой запроса HTTP ORA-06512: на "SYS.UTL_HTTP", line 1720 ORA-29024: Сбой при проверке корректности сертификата ORA-06512: на line 1
orapki wallet create -wallet ./wallet -auto_login orapki wallet add -wallet ./wallet -trusted_cert -cert olegonru.crt orapki wallet display -wallet ./wallet
exec utl_http.set_wallet('file:/u/app/wallet','q1w2e3R$'); select utl_http.request ('https://olegon.ru/') from dual; ORA-29273: сбой запроса HTTP ORA-06512: на "SYS.UTL_HTTP", line 1720 ORA-29024: Сбой при проверке корректности сертификата ORA-06512: на line 1
SET SERVEROUTPUT ON SIZE 40000
CREATE OR REPLACE PROCEDURE DISPLAY_PAGE(url IN VARCHAR2) AS
request_context UTL_HTTP.REQUEST_CONTEXT_KEY;
req UTL_HTTP.REQ;
resp UTL_HTTP.RESP;
data VARCHAR2(1024);
BEGIN
-- Create a request context with its wallet and cookie table
request_context := UTL_HTTP.CREATE_REQUEST_CONTEXT(
wallet_path => 'file:/u/app/wallet',
wallet_password => 'q1w2e3R$',
enable_cookies => TRUE,
max_cookies => 300,
max_cookies_per_site => 20);
-- Make a HTTP request using the private wallet and cookie
-- table in the request context
req := UTL_HTTP.BEGIN_REQUEST(
url => url,
request_context => request_context);
resp := UTL_HTTP.GET_RESPONSE(req);
BEGIN
LOOP
UTL_HTTP.READ_TEXT(resp, data);
DBMS_OUTPUT.PUT(data);
END LOOP;
EXCEPTION
WHEN UTL_HTTP.END_OF_BODY THEN
UTL_HTTP.END_RESPONSE(resp);
END;
-- Destroy the request context
UTL_HTTP.DESTROY_REQUEST_CONTEXT(request_context);
END;
BEGIN
DISPLAY_PAGE('https://olegon.ru');
END;
/