All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.api.MyX509TrustManager Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package com.api;

/**
 * Created by zhengyu06 on 2017/11/7
 */

import org.testng.Reporter;

import javax.net.ssl.X509TrustManager;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

public class MyX509TrustManager implements X509TrustManager {

    @Override
    public void checkClientTrusted(X509Certificate[] chain, String authType)
            throws CertificateException {
        Reporter.log("checkClientTrusted function was called.", true);
    }

    @Override
    public void checkServerTrusted(X509Certificate[] chain, String authType)
            throws CertificateException {
        Reporter.log("checkServerTrusted function was called.", true);
    }

    @Override
    public X509Certificate[] getAcceptedIssuers() {
        Reporter.log("getAcceptedIssuers function was called.", true);
        return null;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy