Code example for SSLPeerUnverifiedException

0
    /* 
     * @see javax.net.ssl.SSLSession#getPeerCertificateChain() 
     */ 
    public X509Certificate[] getPeerCertificateChain()
    throws SSLPeerUnverifiedException { 
        throw new SSLPeerUnverifiedException("test exception");
    } 
 
    /* 
     * @see javax.net.ssl.SSLSession#getPeerCertificates() 
     */ 
    public Certificate[] getPeerCertificates()
    throws SSLPeerUnverifiedException { 
        throw new SSLPeerUnverifiedException("test exception");
    } 
 
    /* 
     * @see javax.net.ssl.SSLSession#getPeerHost() 
     */ 
    public String getPeerHost() {
        return null;