String key = generatePEMCSR(kp, "CN=testmail@example.com");
Certificate c = new Certificate(u, u, Certificate.buildDN("CN", "testmail@example.com"), Digest.SHA256, key, CSRType.CSR, CertificateProfile.getById(1));
final PrivateKey pk = kp.getPrivate();
String key = generatePEMCSR(kp, "CN=testmail@example.com");
Certificate c = new Certificate(u, u, Certificate.buildDN("CN", "testmail@example.com"), Digest.SHA256, key, CSRType.CSR, CertificateProfile.getById(1));
final PrivateKey pk = kp.getPrivate();
URLConnection con = new URL("https://" + ServerConstants.getSecureHostNamePort()).openConnection();
authenticateClientCert(pk, c.cert(), (HttpURLConnection) con);
URLConnection con = new URL("https://" + ServerConstants.getSecureHostNamePort()).openConnection();
authenticateClientCert(pk, c.cert(), (HttpURLConnection) con);