add missing file

This commit is contained in:
Alexander 2023-05-07 01:48:03 +02:00
parent 2b3376a89b
commit 85a080f4ef
1 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,56 @@
/**
*
*/
package cx.lehmann.gemini.gemini;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
/**
* @author <a href="https://oss.lehmann.cx/">Alexander Lehmann</a>
*
*/
public class MyTrustManager implements X509TrustManager {
// private final Logger LOGGER=LoggerFactory.getLogger(this.getClass());
final X509TrustManager tm;
/**
* @param tm
*/
public MyTrustManager(TrustManager tm) {
this.tm=(X509TrustManager)tm;
}
@Override
public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
// LOGGER.info("checkClientTrusted");
System.out.println("checkClientTrusted");
}
@Override
public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
// LOGGER.info("checkServerTrusted");
System.out.println("checkServerTrusted");
}
// X509Certificate certs[]= {};
@Override
public X509Certificate[] getAcceptedIssuers() {
// LOGGER.info("getAcceptedIssuers");
System.out.println("getAcceptedIssuers");
// Exception ex=new Exception();
// ex.printStackTrace();
return tm.getAcceptedIssuers();
}
}