code: private String downloadCert(URI certUrl) {
          try {
              signingCertUrlVerifier.verifyCertUrl(certUrl);
              HttpResponse response = client.execute(new HttpGet(certUrl));
              if (ApacheUtils.isRequestSuccessful(response)) {
                  try {
                      return IOUtils.toString(response.getEntity().getContent());
                  } finally {
                      response.getEntity().getContent().close();
                  }
              } else {
                  throw new HttpException("Could not download the certificate from SNS", response);
              }
          } catch (IOException e) {
              throw new SdkClientException("Unable to download SNS certificate from " + certUrl.toString(), e);
          }
      }
docs: Downloads the certificate from the provided URL. Asserts that the endpoint is an SNS endpoint and that
  the certificate is vended over HTTPs.
  
  @param certUrl URL to download certificate from.
  @return String contents of certificate.
  @throws SdkClientException If certificate cannot be downloaded or URL is invalid.