Code example for SSLPeerUnverifiedException

0
        return certs;
    } 
 
    public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException {
        if (peerCertificates == null) {
            throw new SSLPeerUnverifiedException("No peer certificate");
        } 
        return peerCertificates;
    } 
 
    public String getPeerHost() {
        return peerHost;
    } 
 
    public int getPeerPort() { 
        return peerPort;
    } 
 
    public Principal getPeerPrincipal() throws SSLPeerUnverifiedException {
        if (peerCertificates == null) {
            throw new SSLPeerUnverifiedException("No peer certificate");