class ConnectionProperties {

    private static final Logger LOGGER = LogManager.getLogger(ConnectionProperties.class);

    private final InetAddress address;
    private final Protocol protocol;
    private final boolean hasSSL;

    @Nullable
    private final SSLSession sslSession;

    public ConnectionProperties(InetAddress address, Protocol protocol, @Nullable SSLSession sslSession) {
        this.address = address;
        this.protocol = protocol;
        this.hasSSL = sslSession != null;
        this.sslSession = sslSession;
    }

    public boolean hasSSL() {
        return hasSSL;
    }

    public InetAddress address() {
        return address;
    }

    public Protocol protocol() {
        return protocol;
    }

    public Certificate clientCert() {<FILL_FUNCTION_BODY>}
}

        // This logic isn't in the constructor to prevent logging in case of SSL without (expected) client-certificate auth
        if (sslSession != null) {
            try {
                return sslSession.getPeerCertificates()[0];
            } catch (ArrayIndexOutOfBoundsException | SSLPeerUnverifiedException e) {
                LOGGER.debug("Client certificate not available", e);
            }
        }
        return null;
    
<no_super_class>