我尝试访问由安全站点提供的 Web 服务,该站点具有我导出并添加到钱包中的加密 TLS 1.2 证书。
首先,我尝试在 11.2.0.1.0
ORACLE 数据库上使用 UTL_HTTP.request 包访问该站点,但我有 ORA-28857
SSL 错误未知消息。
我在 12.1.0.1.0
ORACLE 数据库上尝试相同的操作,但收到 ORA-29024
消息。
所以,我在网上搜索并找到了与该主题相关的所有内容,但一无所获......
这是我所做的:
首先:我从 Internet Explorer 导出了 PKCS #7 (.p7b) 格式的证书(包括链)
然后,我使用orapki实用程序创建一个钱包
orapki wallet create -wallet e:\wallet -pwd <pwd>
然后我添加我的证书
orapki wallet add -wallet e:\wallet -trusted_cert -cert e:\certificats\<cert file> -pwd <pwd>
我尝试访问安全站点
SELECT UTL_HTTP.REQUEST('https://<secured site>.com',null,'file:E:\wallet','<pwd>')
FROM dual;
我有消息:
ORA-29273: échec de demande HTTP ORA-06512: à "SYS.UTL_HTTP", ligne 1722 ORA-28857: Erreur SSL inconnue ORA-06512: à ligne 1 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.
我尝试创建ACL:
BEGIN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(
acl => 'utl_http.xml',
description => 'Test ACL',
principal => '<user>',
is_grant => TRUE,
privilege => 'connect',
start_date => null,
end_date => null
);
END;
/
BEGIN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(
acl => 'utl_http.xml',
principal => '<user>',
is_grant => TRUE,
privilege => 'use-client-certificates',
start_date => null,
end_date => null);
END;
/
BEGIN
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (
acl => 'utl_http.xml',
host => '<secured site>',
lower_port => 1,
upper_port => 9999);
END;
/
BEGIN
DBMS_NETWORK_ACL_ADMIN.ASSIGN_WALLET_ACL(
acl => 'utl_http.xml',
wallet_path => 'file:E:\wallet');
END;
/
(我不确定所有这些是否有用,但我已准备好尽一切努力来实现这一目标 ^^)
我尝试访问安全站点
SELECT UTL_HTTP.REQUEST('https://<secured site>.com',null,'file:E:\wallet','<pwd>')
FROM dual;
我有消息:
Rapport d’erreur : ORA-29273: échec de demande HTTP ORA-06512: à "SYS.UTL_HTTP", ligne 1130 ORA-29024: Echec de validation de certificat ORA-06512: à ligne 10 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.
我了解到 Oracle 11 在 TLS 1.2 加密证书方面存在问题,因此我尝试使用 Oracle 12(创建钱包和 ACL 的方法相同)
我有消息:
Rapport d’erreur : ORA-29273: échec de demande HTTP ORA-06512: à "SYS.UTL_HTTP", ligne 1130 ORA-29024: Echec de validation de certificat ORA-06512: à ligne 10 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.
希望我的解释很清楚
我尝试知道如何通过基于证书的证书访问安全站点
感谢您的大力支持
致以诚挚的问候
最佳答案
也许我来得太晚了,但我发现了同样的问题并找到了一些答案。
11.2.0.3之前的Oracle数据库不支持SHA2 SSL标准,例如我们无法从11.2.0.1连接google。
使用 12c 时 - 尝试从钱包中删除链的最终证书。 (我在这里找到了这个答案:Using utl_http & wallets on 12c: certificate validation failure)
关于ORACLE、UTL_HTTP 和 SSL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29214248/