Skip to content

Instantly share code, notes, and snippets.

View rgpower's full-sized avatar

Rick Power rgpower

  • Halifax, NS
View GitHub Profile
@rgpower
rgpower / PKIX.java
Last active April 3, 2025 12:44
Small utility to test Java truststore roots, easy to copy to a vm/container and run via "java -Djavax.ssl.trustStore... PKIX.java <URL>"
import java.net.*;
import java.io.*;
public class PKIX {
public static void main(String[] args) throws Exception {
URL u = new URL(args[0]);
URLConnection uc = u.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)