I want to call API so that I can integrate SMS gateway in my application for that purpose the steps will be
- Get the certificates
- Create a wallet
- Add certificates to wallet
- Create ACL.
Certificates have been added to the wallet. Below command is verifying about the saved certificates.
F:\cert>orapki wallet display -wallet F:/cert
Oracle PKI Tool : Version 12.1.0.2
Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
Requested Certificates:
User Certificates:
Trusted Certificates:
Subject: CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US
Subject: CN=DST Root CA X3,O=Digital Signature Trust Co.
Created the ACL.
BEGIN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('www.xml', 'WWW ACL', 'SCOTT', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE('www.xml', 'SCOTT', TRUE, 'resolve');
-- All
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('www.xml', '*');
END;
commit;
The procedure I am using for HTTP connection along with wallet
CREATE OR REPLACE PROCEDURE GET_SESSION_ID (url VARCHAR2) AS
request UTL_HTTP.REQ;
response UTL_HTTP.RESP;
BEGIN
UTL_HTTP.set_wallet('file:F:/cert', 'mypassword');
DBMS_OUTPUT.PUT_LINE(url);
UTL_HTTP.SET_RESPONSE_ERROR_CHECK(FALSE);
request := UTL_HTTP.BEGIN_REQUEST(url, 'GET');
UTL_HTTP.SET_HEADER(request, 'User-Agent', 'Mozilla/4.0');
response := UTL_HTTP.GET_RESPONSE(request);
DBMS_OUTPUT.PUT_LINE('HTTP response status code: ' || response.status_code);
END GET_SESSION_ID;
but getting the error
Error report - ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1130 ORA-28857: Unknown SSL error ORA-06512: at "SCOTT.GET_SESSION_ID", line 11 ORA-06512: at line 9 29273. 00000 - "HTTP request failed" *Cause: The UTL_HTTP package failed to execute the HTTP request. *Action: Use get_detailed_sqlerrm to check the detailed error message. Fix the error and retry the HTTP request.
Please help!