我们正在使用 oracle 12.1.0.1.0。
我们一直在通过 utl_http 向许多服务发出 https 调用,没有任何问题。我们已经这样做了多年,我们也一直在使用它来进行 facebook 授权。
最近,我们遇到了在 https 中调用 facebook.com 网址的问题,我们无法解决。这似乎与 facebook 切换到在 *.facebook.com 上使用证书相吻合。虽然我不敢说这是原因,但它可能是相关的。只是为了节省您的时间,我们擅长网络 acl 授权并且没有证书验证错误。
我们得到的错误代码是:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-28750: unknown error
ORA-06512: at "SYS.UTL_HTTP", line 1130
错误发生在发出 utl_http.begin_request 的 pl/sql 行上。
我的问题是:任何人都可以复制这个问题吗?有人去过那里并找到解决方案吗?任何输入表示赞赏。
我包括两个例子:一个是对 redhat.com 域的调用,它工作正常。另一个是对存在上述问题的 facebook.com 域的调用。两种情况下使用的代码相同。两个域都使用 *.domain 上的证书。
目标页面:https ://www.redhat.com/en/about
-- redhat 页面的证书链
GTE CyberTrus Global Root
Baltimore CyberTrust Root <=== rh_01.crt
Cybertrust Public SureServer SV CA <=== rh_02.crt
*.redhat.com
-- 钱包包含箭头标记的证书。我们不包括 *.redhat.com 证书,因为只有受信任的证书才应该进入钱包。
-- 以下是 redhat.com 钱包的创建方式。
orapki wallet create -wallet /dir1/rh -pwd walletpassword -auto_login
orapki wallet add -wallet /dir1/rh -trusted_cert -cert "/dir1/rh/rh_01.crt" -pwd walletpassword
orapki wallet add -wallet /dir1/rh -trusted_cert -cert "/dir1/rh/rh_02.crt" -pwd walletpassword
-- 这是进行 https 调用的代码。
declare
wrequest utl_http.req;
wwallet_location varchar2(400) := 'file:/dir1/rh';
wwallet_password varchar2(400) := 'walletpassword';
wurl varchar2(400) := 'https://www.redhat.com/en/about';
begin
utl_http.set_wallet(wwallet_location, wwallet_password);
wrequest := utl_http.begin_request(wurl, 'GET', utl_http.http_version_1_1);
end;
-- 这很好用
=================================================这里是无法调用 facebook 页面的相同设置。
目标页面:https ://www.facebook.com/login/identify?ctx=recover
-- facebook页面的证书链
GTE CyberTrus Global Root
Baltimore CyberTrust Root <=== fc01_.crt
Digicert High Assurance EV Root CA <=== fc02_.crt
Digicert High Assurance CA-3 <=== fc03_.crt
*.facebook.com
-- 钱包包含箭头标记的证书
-- 以下是 facebook 钱包的创建方式。
orapki wallet create -wallet /dir1/fc -pwd walletpassword -auto_login
orapki wallet add -wallet /dir1/fc -trusted_cert -cert "/dir1/fc/fc_01.crt" -pwd walletpassword
orapki wallet add -wallet /dir1/fc -trusted_cert -cert "/dir1/fc/fc_02.crt" -pwd walletpassword
orapki wallet add -wallet /dir1/fc -trusted_cert -cert "/dir1/fc/fc_03.crt" -pwd walletpassword
-- 这是进行 https 调用的代码。
declare
wrequest utl_http.req;
wwallet_location varchar2(400) := 'file:/dir1/fc';
wwallet_password varchar2(400) := 'walletpassword';
wurl varchar2(400) := 'https://www.facebook.com/login/identify?ctx=recover';
begin
utl_http.set_wallet(wwallet_location, wwallet_password);
wrequest := utl_http.begin_request(wurl, 'GET', utl_http.http_version_1_1);
end;
-- 这段代码给出了错误
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-28750: unknown error
ORA-06512: at "SYS.UTL_HTTP", line 1130
你能复制这个错误吗?还是只有我?提前致谢。