/** * Returns the client certificate. */ private X509Certificate []getClientCertificatesImpl() throws CertificateException { if (! (_s instanceof SSLSocket)) return null; SSLSocket sslSocket = (SSLSocket) _s; SSLSession sslSession = sslSocket.getSession(); if (sslSession == null) return null; try { return (X509Certificate []) sslSession.getPeerCertificates(); } catch (SSLPeerUnverifiedException e) { if (log.isLoggable(Level.FINEST)) log.log(Level.FINEST, e.toString(), e); return null; } catch (Throwable e) { log.log(Level.FINER, e.toString(), e); } return null; }
/** * Returns the client certificate. */ private X509Certificate []getClientCertificatesImpl() throws CertificateException { if (! (_s instanceof SSLSocket)) return null; SSLSocket sslSocket = (SSLSocket) _s; SSLSession sslSession = sslSocket.getSession(); if (sslSession == null) return null; try { return (X509Certificate []) sslSession.getPeerCertificates(); } catch (SSLPeerUnverifiedException e) { if (log.isLoggable(Level.FINEST)) log.log(Level.FINEST, e.toString(), e); return null; } catch (Throwable e) { log.log(Level.FINER, e.toString(), e); } return null; }
/** * Returns the client certificate. */ @Override public X509Certificate []getClientCertificates() throws CertificateException { SSLSocket sslSocket = _sslSocket; if (sslSocket == null) { return null; } SSLSession sslSession = sslSocket.getSession(); if (sslSession == null) return null; try { return (X509Certificate []) sslSession.getPeerCertificates(); } catch (SSLPeerUnverifiedException e) { if (log.isLoggable(Level.FINEST)) log.log(Level.FINEST, e.toString(), e); return null; } catch (Throwable e) { log.log(Level.FINER, e.toString(), e); } return null; }
/** * Returns the client certificate. */ private X509Certificate []getClientCertificatesImpl() throws CertificateException { if (! (getSocket() instanceof SSLSocket)) return null; SSLSocket sslSocket = (SSLSocket) getSocket(); SSLSession sslSession = sslSocket.getSession(); if (sslSession == null) return null; try { return (X509Certificate []) sslSession.getPeerCertificates(); } catch (SSLPeerUnverifiedException e) { if (log.isLoggable(Level.FINEST)) log.log(Level.FINEST, e.toString(), e); return null; } catch (Throwable e) { log.log(Level.FINER, e.toString(), e); } return null; }