Skip to content

Instantly share code, notes, and snippets.

View ValidateCertUseOCSP.java
import java.io.*;
import java.net.URI;
import java.security.*;
import java.security.cert.*;
import java.util.*;
import java.security.cert.X509Certificate;
import java.security.cert.PKIXParameters;
/**
* Check the revocation status of a public key certificate using OCSP.
@spyhunter99
spyhunter99 / MimeGenerator.java
Created May 12, 2017
Using java, generates Java constants for all HTTP mime types
View MimeGenerator.java
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.net.URL;
public class MimeGenerator {
public static void main(String[] args) throws Exception {
URL url = new URL("https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types");
You can’t perform that action at this time.