Example usage for javax.net.ssl HandshakeCompletedEvent getPeerCertificates

List of usage examples for javax.net.ssl HandshakeCompletedEvent getPeerCertificates

Introduction

In this page you can find the example usage for javax.net.ssl HandshakeCompletedEvent getPeerCertificates.

Prototype

public java.security.cert.Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException 

Source Link

Document

Returns the identity of the peer which was established as part of defining the session.

Usage

From source file:org.mule.transport.http.HttpServerConnection.java

@Override
public void handshakeCompleted(HandshakeCompletedEvent handshakeCompletedEvent) {
    try {// w  w w.  j av  a  2s  .  com
        localCertificateChain = handshakeCompletedEvent.getLocalCertificates();
        try {
            peerCertificateChain = handshakeCompletedEvent.getPeerCertificates();
        } catch (SSLPeerUnverifiedException e) {
            logger.debug("Cannot get peer certificate chain: " + e.getMessage());
        }
    } finally {
        sslSocketHandshakeComplete.release();
    }
}