@SuppressWarnings("static-method")
@Test
public void testCertGeneration() throws Exception {

	final CertPack cp = CertUtil.getCertPackForLocalhostSsl("AutoFirma", "654321"); //$NON-NLS-1$ //$NON-NLS-2$
	System.out.println(AOUtil.getCN((X509Certificate) cp.getCaCertificate()));
	System.out.println(AOUtil.getCN((X509Certificate) cp.getSslCertificate()));
	System.out.println();
	System.out.println();
	System.out.println(AOUtil.hexify(cp.getPkcs12(), true));
	try ( OutputStream fos = new FileOutputStream(File.createTempFile("SSLCERT_", ".cer")) ) { //$NON-NLS-1$ //$NON-NLS-2$
		fos.write(cp.getSslCertificate().getEncoded());
	}
	try ( OutputStream fos = new FileOutputStream(File.createTempFile("CACERT_", ".cer")) ) { //$NON-NLS-1$ //$NON-NLS-2$
		fos.write(cp.getCaCertificate().getEncoded());
	}
}