类java.net.SecureCacheResponse源码实例Demo

下面列出了怎么用java.net.SecureCacheResponse的API类实例代码及写法,或者点击链接到github查看源代码。

/**
 * Returns the certificate chain the client sent to the
 * server, or null if the client did not authenticate.
 */
public java.security.cert.Certificate[] getLocalCertificates() {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getLocalCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }
    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getLocalCertificates ());
    }
}
 
/**
 * Returns the server's certificate chain, or throws
 * SSLPeerUnverified Exception if
 * the server did not authenticate.
 */
public java.security.cert.Certificate[] getServerCertificates()
        throws SSLPeerUnverifiedException {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getServerCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }

    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getServerCertificates ());
    }
}
 
/**
 * Returns the certificate chain the client sent to the
 * server, or null if the client did not authenticate.
 */
public java.security.cert.Certificate[] getLocalCertificates() {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getLocalCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }
    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getLocalCertificates ());
    }
}
 
/**
 * Returns the server's certificate chain, or throws
 * SSLPeerUnverified Exception if
 * the server did not authenticate.
 */
public java.security.cert.Certificate[] getServerCertificates()
        throws SSLPeerUnverifiedException {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getServerCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }

    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getServerCertificates ());
    }
}
 
/**
 * Returns the server's certificate chain, or throws
 * SSLPeerUnverified Exception if
 * the server did not authenticate.
 */
public java.security.cert.Certificate[] getServerCertificates()
        throws SSLPeerUnverifiedException {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getServerCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }

    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getServerCertificates ());
    }
}
 
/**
 * Returns the server's certificate chain, or throws
 * SSLPeerUnverified Exception if
 * the server did not authenticate.
 */
public java.security.cert.Certificate[] getServerCertificates()
        throws SSLPeerUnverifiedException {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getServerCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }

    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getServerCertificates ());
    }
}
 
/**
 * Returns the certificate chain the client sent to the
 * server, or null if the client did not authenticate.
 */
public java.security.cert.Certificate[] getLocalCertificates() {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getLocalCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }
    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getLocalCertificates ());
    }
}
 
/**
 * Returns the server's certificate chain, or throws
 * SSLPeerUnverified Exception if
 * the server did not authenticate.
 */
public java.security.cert.Certificate[] getServerCertificates()
        throws SSLPeerUnverifiedException {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l =
                ((SecureCacheResponse)cachedResponse)
                        .getServerCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }

    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getServerCertificates ());
    }
}
 
/**
 * Returns the server's certificate chain, or throws
 * SSLPeerUnverified Exception if
 * the server did not authenticate.
 */
public java.security.cert.Certificate[] getServerCertificates()
        throws SSLPeerUnverifiedException {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getServerCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }

    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getServerCertificates ());
    }
}
 
/**
 * Returns the certificate chain the client sent to the
 * server, or null if the client did not authenticate.
 */
public java.security.cert.Certificate[] getLocalCertificates() {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getLocalCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }
    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getLocalCertificates ());
    }
}
 
/**
 * Returns the server's certificate chain, or throws
 * SSLPeerUnverified Exception if
 * the server did not authenticate.
 */
public java.security.cert.Certificate[] getServerCertificates()
        throws SSLPeerUnverifiedException {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getServerCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }

    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getServerCertificates ());
    }
}
 
/**
 * Returns the certificate chain the client sent to the
 * server, or null if the client did not authenticate.
 */
public java.security.cert.Certificate[] getLocalCertificates() {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getLocalCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }
    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getLocalCertificates ());
    }
}
 
/**
 * Returns the server's certificate chain, or throws
 * SSLPeerUnverified Exception if
 * the server did not authenticate.
 */
public java.security.cert.Certificate[] getServerCertificates()
        throws SSLPeerUnverifiedException {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getServerCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }

    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getServerCertificates ());
    }
}
 
/**
 * Returns the certificate chain the client sent to the
 * server, or null if the client did not authenticate.
 */
public java.security.cert.Certificate[] getLocalCertificates() {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getLocalCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }
    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getLocalCertificates ());
    }
}
 
/**
 * Returns the server's certificate chain, or throws
 * SSLPeerUnverified Exception if
 * the server did not authenticate.
 */
public java.security.cert.Certificate[] getServerCertificates()
        throws SSLPeerUnverifiedException {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getServerCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }

    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getServerCertificates ());
    }
}
 
/**
 * Returns the certificate chain the client sent to the
 * server, or null if the client did not authenticate.
 */
public java.security.cert.Certificate[] getLocalCertificates() {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getLocalCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }
    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getLocalCertificates ());
    }
}
 
/**
 * Returns the certificate chain the client sent to the
 * server, or null if the client did not authenticate.
 */
public java.security.cert.Certificate[] getLocalCertificates() {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getLocalCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }
    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getLocalCertificates ());
    }
}
 
/**
 * Returns the certificate chain the client sent to the
 * server, or null if the client did not authenticate.
 */
public java.security.cert.Certificate[] getLocalCertificates() {
    if (cachedResponse != null) {
        List<java.security.cert.Certificate> l = ((SecureCacheResponse)cachedResponse).getLocalCertificateChain();
        if (l == null) {
            return null;
        } else {
            return l.toArray(new java.security.cert.Certificate[0]);
        }
    }
    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getLocalCertificates ());
    }
}
 
@Override public Principal getLocalPrincipal() {
  SecureCacheResponse cacheResponse = delegate.getSecureCacheResponse();
  if (cacheResponse != null) {
    return cacheResponse.getLocalPrincipal();
  }
  SSLSocket sslSocket = getSslSocket();
  if (sslSocket != null) {
    return sslSocket.getSession().getLocalPrincipal();
  }
  return null;
}
 
@Override public Certificate[] getLocalCertificates() {
  SecureCacheResponse cacheResponse = delegate.getSecureCacheResponse();
  if (cacheResponse != null) {
    List<Certificate> result = cacheResponse.getLocalCertificateChain();
    return result != null ? result.toArray(new Certificate[result.size()]) : null;
  }
  SSLSocket sslSocket = getSslSocket();
  if (sslSocket != null) {
    return sslSocket.getSession().getLocalCertificates();
  }
  return null;
}
 
/**
 * Returns the server's principal, or throws SSLPeerUnverifiedException
 * if the server did not authenticate.
 */
Principal getPeerPrincipal()
        throws SSLPeerUnverifiedException
{
    if (cachedResponse != null) {
        return ((SecureCacheResponse)cachedResponse).getPeerPrincipal();
    }

    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getPeerPrincipal());
    }
}
 
/**
 * Returns the principal the client sent to the
 * server, or null if the client did not authenticate.
 */
Principal getLocalPrincipal()
{
    if (cachedResponse != null) {
        return ((SecureCacheResponse)cachedResponse).getLocalPrincipal();
    }

    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getLocalPrincipal());
    }
}
 
@Override public Certificate[] getLocalCertificates() {
  SecureCacheResponse cacheResponse = delegate.getSecureCacheResponse();
  if (cacheResponse != null) {
    List<Certificate> result = cacheResponse.getLocalCertificateChain();
    return result != null ? result.toArray(new Certificate[result.size()]) : null;
  }
  SSLSocket sslSocket = getSslSocket();
  if (sslSocket != null) {
    return sslSocket.getSession().getLocalCertificates();
  }
  return null;
}
 
/**
 * Returns the principal the client sent to the
 * server, or null if the client did not authenticate.
 */
Principal getLocalPrincipal()
{
    if (cachedResponse != null) {
        return ((SecureCacheResponse)cachedResponse).getLocalPrincipal();
    }

    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
        return (((HttpsClient)http).getLocalPrincipal());
    }
}
 
源代码25 项目: android-discourse   文件: HttpsURLConnectionImpl.java
@Override
public Certificate[] getLocalCertificates() {
    SecureCacheResponse cacheResponse = delegate.getSecureCacheResponse();
    if (cacheResponse != null) {
        List<Certificate> result = cacheResponse.getLocalCertificateChain();
        return result != null ? result.toArray(new Certificate[result.size()]) : null;
    }
    SSLSocket sslSocket = getSslSocket();
    if (sslSocket != null) {
        return sslSocket.getSession().getLocalCertificates();
    }
    return null;
}
 
/**
 * Returns the cipher suite in use on this connection.
 */
public String getCipherSuite () {
    if (cachedResponse != null) {
        return ((SecureCacheResponse)cachedResponse).getCipherSuite();
    }
    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
       return ((HttpsClient)http).getCipherSuite ();
    }
}
 
/**
 * Returns the cipher suite in use on this connection.
 */
public String getCipherSuite () {
    if (cachedResponse != null) {
        return ((SecureCacheResponse)cachedResponse).getCipherSuite();
    }
    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
       return ((HttpsClient)http).getCipherSuite ();
    }
}
 
源代码28 项目: reader   文件: HttpsURLConnectionImpl.java
@Override public Certificate[] getServerCertificates() throws SSLPeerUnverifiedException {
  SecureCacheResponse cacheResponse = delegate.getSecureCacheResponse();
  if (cacheResponse != null) {
    List<Certificate> result = cacheResponse.getServerCertificateChain();
    return result != null ? result.toArray(new Certificate[result.size()]) : null;
  }
  SSLSocket sslSocket = getSslSocket();
  if (sslSocket != null) {
    return sslSocket.getSession().getPeerCertificates();
  }
  return null;
}
 
源代码29 项目: wildfly-samples   文件: HttpsURLConnectionImpl.java
@Override public String getCipherSuite() {
  SecureCacheResponse cacheResponse = delegate.getSecureCacheResponse();
  if (cacheResponse != null) {
    return cacheResponse.getCipherSuite();
  }
  SSLSocket sslSocket = getSslSocket();
  if (sslSocket != null) {
    return sslSocket.getSession().getCipherSuite();
  }
  return null;
}
 
/**
 * Returns the cipher suite in use on this connection.
 */
public String getCipherSuite () {
    if (cachedResponse != null) {
        return ((SecureCacheResponse)cachedResponse).getCipherSuite();
    }
    if (http == null) {
        throw new IllegalStateException("connection not yet open");
    } else {
       return ((HttpsClient)http).getCipherSuite ();
    }
}
 
 类所在包
 同包方法