programing

12c에서 utl_http &wallet 사용: 인증서 유효성 검사 실패

codeshow 2023. 8. 20. 12:56
반응형

12c에서 utl_http &wallet 사용: 인증서 유효성 검사 실패

제가 이것 때문에 대머리가 될 것이기 때문에 누군가 제가 무엇을 잘못하고 있는지 알아차릴 수 있기를 바랍니다.

저는 utl_http & wallet을 사용하여 큰 문제 없이 11gR1에서 https를 호출했지만, 우리의 새로운 12c 설치는 저에게 많은 슬픔을 주고 있습니다.

Oracle Wallet Manager와 명령줄을 모두 사용하여 신뢰할 수 있는 인증서를 가져오려고 했지만 성공하지 못했습니다.오라클이 지갑 캐시에 대해 까다로울 수 있다는 것을 알고 있기 때문에 새로운 세션을 여러 번 시도했지만 실패했습니다.

*.presstogo.com , Geottrust SSL CA 및 Geottrust Global CA에 필요한 3개의 인증서를 다운로드했습니다.

내 빌딩 지갑의 명령줄 버전은 다음과 같습니다.

orapki wallet create -wallet /oracle/product/12.0.1/owm/wallets/test1237 -pwd test=1237 -auto_login  
orapki wallet add -wallet /oracle/product/12.0.1/owm/wallets/test1237 -trusted_cert -cert "*.presstogo.com" -pwd test=1237  
orapki wallet add -wallet /oracle/product/12.0.1/owm/wallets/test1237 -trusted_cert -cert "GeoTrust SSL CA" -pwd test=1237  
orapki wallet add -wallet /oracle/product/12.0.1/owm/wallets/test1237 -trusted_cert -cert "Geotrust Global CA" -pwd test=1237  
orapki wallet display -wallet /oracle/product/12.0.1/owm/wallets/test1237   
Oracle PKI Tool : Version 12.1.0.1  
Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.  
Requested Certificates:   
User Certificates:  
Trusted Certificates:   
Subject:        OU=Class 3 Public Primary Certification Authority,O=VeriSign\, Inc.,C=US  
Subject:        CN=GTE CyberTrust Global Root,OU=GTE CyberTrust Solutions\, Inc.,O=GTE Corporation,C=US  
Subject:        CN=GeoTrust SSL CA,O=GeoTrust\, Inc.,C=US  
Subject:        OU=Class 2 Public Primary Certification Authority,O=VeriSign\, Inc.,C=US  
Subject:        OU=Class 1 Public Primary Certification Authority,O=VeriSign\, Inc.,C=US  
Subject:        CN=GeoTrust Global CA,O=GeoTrust Inc.,C=US  
Subject:        CN=*.presstogo.com,OU=IT,O=Press to go AS,L=Oslo,ST=Norway,C=NO,SERIAL_NUM=SJYpOHrRdCDHE8KZ6dRFGMJthOjs7-v3  

좋아요, 이것을 테스트해 보겠습니다.sqlplus에 로그인하고 다음을 실행합니다.

declare  
    lo_req    utl_http.req;  
    lo_resp   utl_http.resp;  
begin  
    utl_http.set_detailed_excp_support ( true );  
    utl_http.set_wallet ( 'file:/oracle/product/12.0.1/owm/wallets/test1237', 'test=1237');  
    lo_req := utl_http.begin_request ( 'https://production.presstogo.com/mars/hello' );  
    lo_resp := utl_http.get_response ( lo_req );  
    -- A successfull request would have the status code "200".   
    dbms_output.put_line ( lo_resp.status_code );  
    utl_http.end_response ( lo_resp );  
exception  
  when others then    
    utl_http.end_response ( lo_resp );  
    raise;  
end;  

선언하다

*

1행 오류:

ORA-29273: HTTP 요청 실패

ORA-06512: "SYS"에 있습니다.UTL_HTTP", 1130행

ORA-29024:인증서 유효성 검사 실패

ORA-06512: 6호선에서

참고로, 다음과 같은 기능이 있다는 것을 유념할 필요가 있습니다.

declare  
    lo_req    utl_http.req;  
    lo_resp   utl_http.resp;  
begin  
    utl_http.set_wallet ( 'file:/oracle/product/12.0.1/owm/wallets/test1237', 'test=1237');  
    lo_req := utl_http.begin_request ( 'https://www.google.be' );  
    lo_resp := utl_http.get_response ( lo_req );  
    dbms_output.put_line ( lo_resp.status_code );  
    utl_http.end_response ( lo_resp );  
end;  
/  

도와줘 오비완, 넌 내 유일한 희망이야.

다른 사람들의 이익을 위해 나의 질문에 대답하는 것.

Oracle Support에 따르면 엔드 사이트 인증서가 아닌 인증서 체인만 가져와야 합니다.위에서 사용한 예제에서는 다음 인증서만 지갑으로 가져옵니다.

Geotrust SSL CA&Geotrust Global CA

*.presstogo.com 인증서를 가져오지 않음

Oracle 지원 견적 작성하기

12c에서 선택이 실패하는 이유는 12c가 지갑의 사용자 인증서를 신뢰할 수 있는 인증서로 보기를 원하지 않기 때문입니다.

이전 버전에서는 문제가 없었으나 지갑에서 인증서를 제거하면 문제가 해결되었습니다.

이것은 https 사이트에 연결하기 위해 utl_http를 사용하는 것과 관련하여 제가 온라인에서 찾은 모든 정보와 모순되어 저는 정말 혼란스럽습니다.

이것이 제 처지에 있는 다른 사람들에게 도움이 되기를 바랍니다.

언급URL : https://stackoverflow.com/questions/19380116/using-utl-http-wallets-on-12c-certificate-validation-failure

반응형