Skip to content

Instantly share code, notes, and snippets.

@mariuszprzydatek
mariuszprzydatek / SSLCertificateValidation.java
Last active February 3, 2023 10:28
mariuszprzydatek.com blog example on how to disable SSL certificate validation in Java
package my.hydepark.ssl;
import javax.net.ssl.*;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
public class SSLCertificateValidation {
public static void disable() {
try {