Code example for SSLSession

Methods: getPeerCertificates

0
 
    /** 
     * javax.net.ssl.SSLSession#getPeerCertificates() 
     */ 
    public void test_getPeerCertificates() throws Exception { 
        Certificate[] res = clientSession.getPeerCertificates();
        assertTrue(res.length > 0);
    } 
 
    /** 
     * javax.net.ssl.SSLSession#getPeerCertificateChain() 
     */ 
    public void test_getPeerCertificateChain() throws Exception { 
        javax.security.cert.X509Certificate[] res = clientSession.getPeerCertificateChain();
        assertTrue(res.length > 0);
    } 
 
    /** 
     * javax.net.ssl.SSLSession#getProtocol() 
     */ 
    public void test_getProtocol() {