2016-08-21 3 views
0

Jersey 클라이언트를 사용하여 서버를 요청하는 Jersey 앱이 있습니다. 서버는 클라이언트 인증서와 기본 인증을 사용하여 통신합니다. 클라이언트 인증서 -> CA 인터 -> CAJava 저지가 ssl 클라이언트 인증서를 보내지 않습니다.

: - -> CA 인터> CA

클라이언트 인증서 체인 서버 인증서 : 나는 글래스 피쉬

서버 인증서 체인의 인증서를 제대로 설정 신뢰 및 키 스토어를

CA는 자체 생성/서명 된 인증서이며 공급 업체가 아닙니다.

신뢰 :

1) CA

2) CA 간

스토어

:

이 코드 전체 체인에

1) 클라이언트 인증서 : (상점은 환경 설정)

sSLContext = SslConfigurator.newInstance().securityProtocol("TLSv1.2").createSSLContext(); 
HttpAuthenticationFeature authFeature = HttpAuthenticationFeature.basic("user", "pass"); 
client = ClientBuilder.newBuilder().sslContext(sSLContext).build(); 
client.register(authFeature); 

모든 인증서와 체인이 올바르게로드되었습니다. 내가 요청을 할 때

그러나 나는

Info: Warning: no suitable certificate found - continuing without client authentication 

도착하고 난 handshake_failure 오류가

내가 얻을 내가 무제한 chiper 확장을 설치하고 있음을 확인했다

Info: http-listener-1(3), setSoTimeout(0) called 
Info: Ignoring unsupported cipher suite: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 for TLSv1 
Info: Ignoring unsupported cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 for TLSv1 
Info: Ignoring unsupported cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA256 for TLSv1 
Info: Ignoring unsupported cipher suite: TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 for TLSv1 
Info: Ignoring unsupported cipher suite: TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 for TLSv1 
Info: Ignoring unsupported cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 for TLSv1 
Info: Ignoring unsupported cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 for TLSv1 
Info: Ignoring unsupported cipher suite: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 for TLSv1.1 
Info: Ignoring unsupported cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 for TLSv1.1 
Info: Ignoring unsupported cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA256 for TLSv1.1 
Info: Ignoring unsupported cipher suite: TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 for TLSv1.1 
Info: Ignoring unsupported cipher suite: TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 for TLSv1.1 
Info: Ignoring unsupported cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 for TLSv1.1 
Info: Ignoring unsupported cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 for TLSv1.1 

이러한 다른 오류 그 일. 아직도 이걸 받고있어.

나는 또한 브라우저의 인증서를 확인했으며 브라우저를 통해 서버에 연결하고 동일한 인증서를 사용하여 데이터를 가져올 수 있습니다.

양방향 SSL을 작동시키는 방법은 무엇입니까?

답변

0

클라이언트와 서버 모두 해당 트러스트 스토어에서 CA 인증서가 필요합니다. 나는 서버가 그렇지 않다고 말할 것이다.

서버가 클라이언트 인증서를 요청

, 그것은 신뢰할 수있는 CA의 목록을 전송하고 클라이언트가 하나를 전송하지 않습니다 그들 중 하나에서 서명 한 인증서,

+0

을 찾을 수없는 경우 나는 두 개의 키 스토어의 cacerts에이 .jks 및 keystore.jks, 클라이언트의 트러스트 스토어는 무엇입니까? 나는 서버와 클라이언트 체인 모두에서 CA와 CA를 상호 운용하며 서로 일치한다. cert-chains.pem은 apache 서버에 설정되어 있습니다. CA 인증서가 들어 있습니다. 그리고 서버 인증서 요청 유형이 클라이언트에있는 하나와 일치하는지 확인했습니다. – Akshit