Java Code Examples for java.net.SecureCacheResponse#getServerCertificateChain()

The following examples show how to use java.net.SecureCacheResponse#getServerCertificateChain() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HttpsURLConnectionImpl.java    From L.TileLayer.Cordova with MIT License 5 votes vote down vote up
@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;
}
 
Example 2
Source File: HttpsURLConnectionImpl.java    From IoTgo_Android_App with MIT License 5 votes vote down vote up
@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;
}
 
Example 3
Source File: HttpsURLConnectionImpl.java    From android-discourse with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example 4
Source File: HttpsURLConnectionImpl.java    From bluemix-parking-meter with MIT License 5 votes vote down vote up
@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;
}
 
Example 5
Source File: HttpsURLConnectionImpl.java    From reader with MIT License 5 votes vote down vote up
@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;
}
 
Example 6
Source File: HttpsURLConnectionImpl.java    From reader with MIT License 5 votes vote down vote up
@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;
}
 
Example 7
Source File: HttpsURLConnectionImpl.java    From cordova-amazon-fireos with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example 8
Source File: HttpsURLConnectionImpl.java    From phonegapbootcampsite with MIT License 5 votes vote down vote up
@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;
}
 
Example 9
Source File: HttpsURLConnectionImpl.java    From CordovaYoutubeVideoPlayer with MIT License 5 votes vote down vote up
@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;
}
 
Example 10
Source File: HttpsURLConnectionImpl.java    From cordova-android-chromeview with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example 11
Source File: HttpsURLConnectionImpl.java    From wildfly-samples with MIT License 5 votes vote down vote up
@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;
}
 
Example 12
Source File: HttpsURLConnectionImpl.java    From phonegap-plugin-loading-spinner with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example 13
Source File: HttpsURLConnectionImpl.java    From crosswalk-cordova-android with Apache License 2.0 5 votes vote down vote up
@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;
}