@Override public int sendSignedRequest(URL url, JSONBuilder claims, Login login) throws AcmeException { return sendSignedRequest(url, claims, login.getSession(), login.getKeyPair(), login.getAccountLocation(), MIME_JSON); }
@Override public int sendCertificateRequest(URL url, Login login) throws AcmeException { return sendSignedRequest(url, null, login.getSession(), login.getKeyPair(), login.getAccountLocation(), MIME_CERTIFICATE_CHAIN); }
@Override public int sendSignedPostAsGetRequest(URL url, Login login) throws AcmeException { return sendSignedRequest(url, null, login.getSession(), login.getKeyPair(), login.getAccountLocation(), MIME_JSON); }
@Override public int sendCertificateRequest(URL url, Login login) throws AcmeException { return sendSignedRequest(url, null, login.getSession(), login.getKeyPair(), login.getAccountLocation(), MIME_CERTIFICATE_CHAIN); }
@Override public int sendSignedRequest(URL url, JSONBuilder claims, Login login) throws AcmeException { return sendSignedRequest(url, claims, login.getSession(), login.getKeyPair(), login.getAccountLocation(), MIME_JSON); }
@Override public int sendSignedPostAsGetRequest(URL url, Login login) throws AcmeException { return sendSignedRequest(url, null, login.getSession(), login.getKeyPair(), login.getAccountLocation(), MIME_JSON); }
/** * Returns the authorization string. * <p> * The default is {@code token + '.' + base64url(jwkThumbprint)}. Subclasses may * override this method if a different algorithm is used. */ public String getAuthorization() { try { PublicKey pk = getLogin().getKeyPair().getPublic(); PublicJsonWebKey jwk = PublicJsonWebKey.Factory.newPublicJwk(pk); return getToken() + '.' + base64UrlEncode(jwk.calculateThumbprint("SHA-256")); } catch (JoseException ex) { throw new AcmeProtocolException("Cannot compute key thumbprint", ex); } }
/** * Returns the authorization string. * <p> * The default is {@code token + '.' + base64url(jwkThumbprint)}. Subclasses may * override this method if a different algorithm is used. */ public String getAuthorization() { try { PublicKey pk = getLogin().getKeyPair().getPublic(); PublicJsonWebKey jwk = PublicJsonWebKey.Factory.newPublicJwk(pk); return getToken() + '.' + base64UrlEncode(jwk.calculateThumbprint("SHA-256")); } catch (JoseException ex) { throw new AcmeProtocolException("Cannot compute key thumbprint", ex); } }
if (Arrays.equals(getLogin().getKeyPair().getPrivate().getEncoded(), newKeyPair.getPrivate().getEncoded())) { throw new IllegalArgumentException("newKeyPair must actually be a new key pair"); payloadClaim.putKey("oldKey", getLogin().getKeyPair().getPublic());
if (Arrays.equals(getLogin().getKeyPair().getPrivate().getEncoded(), newKeyPair.getPrivate().getEncoded())) { throw new IllegalArgumentException("newKeyPair must actually be a new key pair"); payloadClaim.putKey("oldKey", getLogin().getKeyPair().getPublic());