Search in sources :

Example 1 with SSLConnector

use of org.parosproxy.paros.network.SSLConnector in project zaproxy by zaproxy.

the class OptionsParamCertificate method setActiveCertificate.

public void setActiveCertificate() {
    ProtocolSocketFactory sslFactory = Protocol.getProtocol("https").getSocketFactory();
    if (sslFactory instanceof SSLConnector) {
        SSLConnector ssl = (SSLConnector) sslFactory;
        ssl.setActiveCertificate();
    }
}
Also used : ProtocolSocketFactory(org.apache.commons.httpclient.protocol.ProtocolSocketFactory) SSLConnector(org.parosproxy.paros.network.SSLConnector)

Example 2 with SSLConnector

use of org.parosproxy.paros.network.SSLConnector in project zaproxy by zaproxy.

the class OptionsParamCertificate method setEnableCertificate.

public void setEnableCertificate(boolean enabled) {
    ProtocolSocketFactory sslFactory = Protocol.getProtocol("https").getSocketFactory();
    if (sslFactory instanceof SSLConnector) {
        SSLConnector ssl = (SSLConnector) sslFactory;
        ssl.setEnableClientCert(enabled);
        setUseClientCert(enabled);
    }
}
Also used : ProtocolSocketFactory(org.apache.commons.httpclient.protocol.ProtocolSocketFactory) SSLConnector(org.parosproxy.paros.network.SSLConnector)

Aggregations

ProtocolSocketFactory (org.apache.commons.httpclient.protocol.ProtocolSocketFactory)2 SSLConnector (org.parosproxy.paros.network.SSLConnector)2