mirror of https://github.com/shred/acme4j
Remove Pebble workarounds
parent
e3aa1fa4bc
commit
e15abb0ca0
|
@ -38,7 +38,6 @@ import org.shredzone.acme4j.exception.AcmeLazyLoadingException;
|
|||
import org.shredzone.acme4j.exception.AcmeProtocolException;
|
||||
import org.shredzone.acme4j.exception.AcmeRetryAfterException;
|
||||
import org.shredzone.acme4j.exception.AcmeServerException;
|
||||
import org.shredzone.acme4j.provider.pebble.Pebble;
|
||||
import org.shredzone.acme4j.util.JSON;
|
||||
import org.shredzone.acme4j.util.JSONBuilder;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -321,10 +320,7 @@ public class Account extends AcmeResource {
|
|||
.forEach(contacts::add);
|
||||
}
|
||||
|
||||
// TODO PEBBLE: returns an empty string as URL
|
||||
if (!Pebble.workaround()) {
|
||||
this.orders = json.get(KEY_ORDERS).asURL();
|
||||
}
|
||||
this.orders = json.get(KEY_ORDERS).asURL();
|
||||
|
||||
if (json.contains(KEY_STATUS)) {
|
||||
this.status = Status.parse(json.get(KEY_STATUS).asString());
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* acme4j - Java ACME client
|
||||
*
|
||||
* Copyright (C) 2017 Richard "Shred" Körber
|
||||
* http://acme4j.shredzone.org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
package org.shredzone.acme4j.provider.pebble;
|
||||
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Check if Pebble workarounds or strict ACME specifications are to be used.
|
||||
* <p>
|
||||
* To enable the Pebble workarounds, pass {@code -Dpebble=true} to the JVM.
|
||||
* <p>
|
||||
* Do not use this class. It will be removed.
|
||||
*/
|
||||
public final class Pebble {
|
||||
|
||||
private static final boolean PEBBLE_PROPERTY = Boolean.getBoolean("pebble");
|
||||
|
||||
static {
|
||||
if (PEBBLE_PROPERTY) {
|
||||
LoggerFactory.getLogger(Pebble.class).warn("Pebble workarounds enabled!");
|
||||
}
|
||||
}
|
||||
|
||||
private Pebble() {
|
||||
// utility class without constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} to enable Pebble workarounds, {@code false} for strict ACME
|
||||
* specifications.
|
||||
*/
|
||||
public static boolean workaround() {
|
||||
return PEBBLE_PROPERTY;
|
||||
}
|
||||
|
||||
}
|
|
@ -174,19 +174,6 @@
|
|||
</images>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- TODO PEBBLE: remove -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<version>2.20</version>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<pebble>true</pebble>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
@ -44,5 +44,3 @@ _acme4j_ provides a number of integration tests. These tests are _not_ executed
|
|||
To run them, install Docker and make it available to your user. Then invoke `mvn -Pci verify` to run the integration tests. The tests build images of the current [Pebble ACME test server](https://github.com/letsencrypt/pebble), and an internal test server that provides a configurable HTTP and DNS server for Pebble.
|
||||
|
||||
If you change into the `acme-it` project directory, you can also build, start and stop the test servers with `mvn docker:build`, `mvn docker:start` and `mvn docker:stop`, respectively. While the test servers are running, you can execute the integration tests in your IDE.
|
||||
|
||||
The Pebble server requires a few workarounds in _acme4j_ at the moment. To enable them, pass `-Dpebble=true` as VM parameter when running the integration tests.
|
||||
|
|
Loading…
Reference in New Issue