@Override
 public Principal getPeerPrincipal() throws SSLPeerUnverifiedException {
   SecureCacheResponse cacheResponse = delegate.getCacheResponse();
   if (cacheResponse != null) {
     return cacheResponse.getPeerPrincipal();
   }
   checkConnected();
   return delegate.getSSLSocket().getSession().getPeerPrincipal();
 }
 @Override
 public String getCipherSuite() {
   SecureCacheResponse cacheResponse = delegate.getCacheResponse();
   if (cacheResponse != null) {
     return cacheResponse.getCipherSuite();
   }
   checkConnected();
   return delegate.getSSLSocket().getSession().getCipherSuite();
 }
 @Override
 public Principal getLocalPrincipal() {
   SecureCacheResponse cacheResponse = delegate.getCacheResponse();
   if (cacheResponse != null) {
     return cacheResponse.getLocalPrincipal();
   }
   checkConnected();
   return delegate.getSSLSocket().getSession().getLocalPrincipal();
 }
 @Override
 public Certificate[] getServerCertificates() throws SSLPeerUnverifiedException {
   SecureCacheResponse cacheResponse = delegate.getCacheResponse();
   if (cacheResponse != null) {
     List<Certificate> result = cacheResponse.getServerCertificateChain();
     return result != null ? result.toArray(new Certificate[result.size()]) : null;
   }
   checkConnected();
   return delegate.getSSLSocket().getSession().getPeerCertificates();
 }