Code example for SSLPeerUnverifiedException

0
            CertificateFactory cf = CertificateFactory.getInstance(typeDone);
            byte[] barr = TestUtils.getX509Certificate_v3();
            ByteArrayInputStream bis = new ByteArrayInputStream(barr);
            cert = cf.generateCertificate(bis);
        } catch (CertificateException se) {
            throw new SSLPeerUnverifiedException("No server's end-entity certificate");
        } 
        return cert == null ? null : new Certificate[]{cert};
    } 
 
    /* 
     * @see java.net.HttpURLConnection#disconnect() 
     */ 
    public void disconnect() { 
    } 
 
    /* 
     * @see java.net.HttpURLConnection#usingProxy() 
     */ 
    public boolean usingProxy() { 
Contextual code suggestions in your IDE  Get Codota for Java