Skip to content

Commit

Permalink
Don't force NONE proxy setting if a proxy is not provided (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
breedloj authored Sep 6, 2018
1 parent da03586 commit 25ed157
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public final class SkillRequestSignatureVerifier implements SkillServletVerifier
private final Proxy proxy;

public SkillRequestSignatureVerifier() {
this(Proxy.NO_PROXY);
this.proxy = null;
}

/**
Expand Down Expand Up @@ -124,7 +124,8 @@ public void verify(HttpServletRequest servletRequest, byte[] serializedRequestEn
private X509Certificate retrieveAndVerifyCertificateChain(
final String signingCertificateChainUrl) throws CertificateException {
try (InputStream in =
getAndVerifySigningCertificateChainUrl(signingCertificateChainUrl).openConnection(proxy).getInputStream()) {
proxy != null ? getAndVerifySigningCertificateChainUrl(signingCertificateChainUrl).openConnection(proxy).getInputStream()
: getAndVerifySigningCertificateChainUrl(signingCertificateChainUrl).openConnection().getInputStream()) {
CertificateFactory certificateFactory =
CertificateFactory.getInstance(ServletConstants.SIGNATURE_CERTIFICATE_TYPE);
@SuppressWarnings("unchecked")
Expand Down

0 comments on commit 25ed157

Please sign in to comment.