mirror of https://github.com/shred/acme4j
Send kid instead of jwk when revoking a cert (fixes issue #62)
parent
ee291da06b
commit
cd7038a7fa
|
@ -157,7 +157,7 @@ public class Certificate extends AcmeResource {
|
||||||
claims.put("reason", reason.getReasonCode());
|
claims.put("reason", reason.getReasonCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
conn.sendSignedRequest(resUrl, claims, getSession(), getLogin().getKeyPair());
|
conn.sendSignedRequest(resUrl, claims, getLogin());
|
||||||
} catch (CertificateEncodingException ex) {
|
} catch (CertificateEncodingException ex) {
|
||||||
throw new AcmeProtocolException("Invalid certificate", ex);
|
throw new AcmeProtocolException("Invalid certificate", ex);
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,11 +131,10 @@ public class CertificateTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int sendSignedRequest(URL url, JSONBuilder claims, Session session, KeyPair keypair) {
|
public int sendSignedRequest(URL url, JSONBuilder claims, Login login) {
|
||||||
assertThat(url, is(resourceUrl));
|
assertThat(url, is(resourceUrl));
|
||||||
assertThat(claims.toString(), sameJSONAs(getJSON("revokeCertificateRequest").toString()));
|
assertThat(claims.toString(), sameJSONAs(getJSON("revokeCertificateRequest").toString()));
|
||||||
assertThat(session, is(notNullValue()));
|
assertThat(login, is(notNullValue()));
|
||||||
assertThat(keypair, is(notNullValue()));
|
|
||||||
certRequested = false;
|
certRequested = false;
|
||||||
return HttpURLConnection.HTTP_OK;
|
return HttpURLConnection.HTTP_OK;
|
||||||
}
|
}
|
||||||
|
@ -179,11 +178,10 @@ public class CertificateTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int sendSignedRequest(URL url, JSONBuilder claims, Session session, KeyPair keypair) {
|
public int sendSignedRequest(URL url, JSONBuilder claims, Login login) {
|
||||||
assertThat(url, is(resourceUrl));
|
assertThat(url, is(resourceUrl));
|
||||||
assertThat(claims.toString(), sameJSONAs(getJSON("revokeCertificateWithReasonRequest").toString()));
|
assertThat(claims.toString(), sameJSONAs(getJSON("revokeCertificateWithReasonRequest").toString()));
|
||||||
assertThat(session, is(notNullValue()));
|
assertThat(login, is(notNullValue()));
|
||||||
assertThat(keypair, is(notNullValue()));
|
|
||||||
certRequested = false;
|
certRequested = false;
|
||||||
return HttpURLConnection.HTTP_OK;
|
return HttpURLConnection.HTTP_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue