Example usage for javax.net.ssl HandshakeCompletedEvent getLocalCertificates

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

Introduction

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

Prototype

public java.security.cert.Certificate[] getLocalCertificates() 

Source Link

Document

Returns the certificate(s) that were sent to the peer during handshaking.

Usage

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

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