使用通配符证书从oracle utl_http调用https://www.facebook.com

Geo*_*e_G 8 ssl plsql facebook oracle12c

我们正在使用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
Run Code Online (Sandbox Code Playgroud)

发出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
Run Code Online (Sandbox Code Playgroud)

- 钱包包含箭头标记的证书.我们不包含*.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
Run Code Online (Sandbox Code Playgroud)

- 这是进行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;
Run Code Online (Sandbox Code Playgroud)

- 这很好用

===============================================这是相同的设置无法调用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
Run Code Online (Sandbox Code Playgroud)

- 钱包包含箭头标记的证书

- 这是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       
Run Code Online (Sandbox Code Playgroud)

- 这是进行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;
Run Code Online (Sandbox Code Playgroud)

- 此代码给出错误

    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
Run Code Online (Sandbox Code Playgroud)

你能复制这个错误吗?还是只是我?提前致谢.

小智 1

我们遇到了同样的问题,并且 Oracle 确认他们不支持通配 SSL。