मैंने ओरेकल 11 जी से तृतीय पक्ष एपीआई को कॉल करने के लिए पीएल/एसक्यूएल में निम्नलिखित कोड लिखा है।दूसरी ओर से भेजे गए प्रमाणपत्र को सत्यापित नहीं किया जा सकता - ओरेकल वॉलेट
Begin
-- preparing Request...
l_http_request := UTL_HTTP.begin_request ('https://www..........'
, 'GET'
, 'HTTP/1.1');
-- set header's attributes...
UTL_HTTP.set_header(l_http_request, 'Content-Type', 'application/json');
UTL_HTTP.set_header(l_http_request, 'Content-Length', LENGTH(t_request_body));
UTL_HTTP.set_header(l_http_request, 'Api-Key','..............');
-- get Response and obtain received value
l_http_response := UTL_HTTP.get_response(l_http_request);
UTL_HTTP.read_text(l_http_response, l_response_text);
end;
मुझे इस कोड मैं त्रुटि निम्न हो रही है
Error report:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-29024: Certificate validation failure
ORA-06512: at line 13
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.
मैं पता लगा है कि इस 'https' protocole के कारण होता है चलाते हैं। इसलिए मैंने सभी प्रासंगिक प्रमाणपत्र डाउनलोड किए और फिर हमारी डीबी टीम को सौंप दिया। हालांकि उन्होंने इन प्रमाणपत्रों के साथ ओरेकल वॉलेट को कॉन्फ़िगर किया है, फिर भी हमें एक ही त्रुटि रिपोर्ट मिल रही है।
कोई विचार?
अद्यतन: मैंने ब्लॉक में शुरू पहले ही लाइनों के रूप में कोड निम्नलिखित जोड़ा ...
UTL_HTTP.SET_DETAILED_EXCP_SUPPORT(TRUE);
UTL_HTTP.SET_WALLET('file:/../wallet','pwd.....');
लेकिन अब यह अपवाद "प्रमाणपत्र अमान्य है" हालांकि प्रमाण पत्र इस बात की पुष्टि करता है निम्न देता है इसके वैधता। इसके अलावा बाहरी एसएसएल चेकर को भी देखकर वैधता की पुष्टि की जा सकती है: https://www.sslshopper.com।
Error report:
ORA-29024: Certificate validation failure
ORA-06512: at "SYS.UTL_HTTP", line 1128
ORA-06512: at line 16
29024. 00000 - "Certificate validation failure"
*Cause: The certificate sent by the other side could not be validated. This may occur if
the certificate has expired, has been revoked, or is invalid for another reason.
*Action: Check the certificate to determine whether it is valid. Obtain a new certificate,
alert the sender that there certificate has failed, or resend.
कृपया ध्यान दें कि मैं प्रमाण पत्र फ़ाइलों (आधार -64 इनकोडिंग/PKCS # 7 आदि) के सभी प्रारूपों थक है के रूप में http://oracle-base.com/articles/misc/utl_http-and-ssl.php
किसी भी विचारों में विस्तार से बताया?
इस पोस्ट को देखें: http://stackoverflow.com/a/16081869/92837 – Sathya
@ सत्य, उस पोस्ट में उन्होंने पीएल एसक्यूएल कोड को कॉल करने से वॉलेट सेट किया है जैसे EXEC UTL_HTTP.set_wallet ('फ़ाइल:/u01/ऐप/ऑरैकल/एडमिन/डीबी 11 जी/वॉलेट ',' वॉलेटपास्ड 123 '); क्या यह जरूरी है? – CAD
डेटाबेस का * सटीक * संस्करण? क्या यह पूरी तरह से पैच है? आप किस प्रोटोकॉल/संस्करण का उपयोग कर रहे हैं: एसएसएलवी 3? TSLv1? कुछ और? – APC