com.api.MyX509TrustManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-autotest-tool Show documentation
Show all versions of java-autotest-tool Show documentation
This is an integration of autotest tools
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;
}
}