KeyPair kp = generateKeypair();
priv = kp.getPrivate();
String csr = generatePEMCSR(kp, "CN=test");
- CertificateRequest cr = new CertificateRequest(new AuthorizationContext(u, u), csr);
+ CertificateRequest cr = new CertificateRequest(new AuthorizationContext(u, u, false), csr);
cr.update(CertificateRequest.DEFAULT_CN, Digest.SHA512.toString(), "client", null, null, "email:" + email + "\n");
cert = cr.draft();
Job j = cert.issue(null, "2y", u);
assertEquals(CertificateStatus.ISSUED, cert.getStatus());
}
- private TestMail reportCompromiseAndCheck(String params) throws IOException, UnsupportedEncodingException, CertificateEncodingException, GeneralSecurityException {
+ private TestMail reportCompromiseAndCheck(String params) throws IOException, UnsupportedEncodingException, CertificateEncodingException, GeneralSecurityException, GigiApiException {
HttpURLConnection huc = reportCompromise(params);
assertThat(IOUtils.readURL(huc), hasNoError());
TestMail rc = getMailReceiver().receive(email);
return rc;
}
- private HttpURLConnection reportCompromise(String params) throws IOException, UnsupportedEncodingException, CertificateEncodingException, GeneralSecurityException {
+ private HttpURLConnection reportCompromise(String params) throws IOException, UnsupportedEncodingException, CertificateEncodingException, GeneralSecurityException, GigiApiException {
if ( !params.isEmpty() && !params.startsWith("&")) {
params = "&" + params;
}