mirror of https://github.com/shred/acme4j
Checkstyle fixes
parent
c19a6ad1a4
commit
d02746156d
|
@ -50,8 +50,8 @@ public class Certificate extends AcmeResource {
|
|||
private static final long serialVersionUID = 7381527770159084201L;
|
||||
private static final Logger LOG = LoggerFactory.getLogger(Certificate.class);
|
||||
|
||||
private ArrayList<X509Certificate> certChain = null;
|
||||
private ArrayList<URL> alternates = null;
|
||||
private ArrayList<X509Certificate> certChain;
|
||||
private ArrayList<URL> alternates;
|
||||
|
||||
protected Certificate(Login login, URL certUrl) {
|
||||
super(login, certUrl);
|
||||
|
|
|
@ -457,7 +457,7 @@ public class DefaultConnection implements Connection {
|
|||
private void throwAcmeException() throws AcmeException {
|
||||
try {
|
||||
String contentType = AcmeUtils.getContentType(conn.getHeaderField(CONTENT_TYPE_HEADER));
|
||||
if (!"application/problem+json".equals(contentType)) {
|
||||
if (!MIME_JSON_PROBLEM.equals(contentType)) {
|
||||
throw new AcmeException("HTTP " + conn.getResponseCode() + ": " + conn.getResponseMessage());
|
||||
}
|
||||
|
||||
|
|
|
@ -26,10 +26,8 @@ import java.security.cert.CertificateException;
|
|||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLSession;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
import javax.net.ssl.TrustManagerFactory;
|
||||
|
||||
|
@ -42,14 +40,6 @@ import org.shredzone.acme4j.connector.HttpConnector;
|
|||
@ParametersAreNonnullByDefault
|
||||
@ThreadSafe
|
||||
public class PebbleHttpConnector extends HttpConnector {
|
||||
|
||||
private static HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER = new HostnameVerifier() {
|
||||
@Override
|
||||
public boolean verify(String hostname, SSLSession session) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
private static SSLSocketFactory sslSocketFactory;
|
||||
|
||||
@Override
|
||||
|
@ -58,7 +48,7 @@ public class PebbleHttpConnector extends HttpConnector {
|
|||
if (conn instanceof HttpsURLConnection) {
|
||||
HttpsURLConnection conns = (HttpsURLConnection) conn;
|
||||
conns.setSSLSocketFactory(createSocketFactory());
|
||||
conns.setHostnameVerifier(ALLOW_ALL_HOSTNAME_VERIFIER);
|
||||
conns.setHostnameVerifier((hostname, session) -> true);
|
||||
}
|
||||
return conn;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue