title: Downloading captcha from specific URL
body: <p>I'm trying to download a captcha image from a specific URL because I'm working on a program to solve simple captchas.
  The url I'm using: <a href="https://www.mannschaftsfoto-nrw.de/rpc/captcha/Ddc3Lp5eOshwmzWfpgL4cNCTnZTcOU2T" rel="nofollow">https://www.mannschaftsfoto-nrw.de/rpc/captcha/Ddc3Lp5eOshwmzWfpgL4cNCTnZTcOU2T</a>
  I've read many posts before and tried different things, what I'm using right now is this code:</p>
  
  <pre><code>URL url = new URL("https://www.mannschaftsfoto-nrw.de/rpc/captcha/Ddc3Lp5eOshwmzWfpgL4cNCTnZTcOU2T"); 
    InputStream in = new BufferedInputStream(url.openStream());
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    byte[] buf = new byte[1024];
    int n = 0;
    while (-1!=(n=in.read(buf)))
    {
      out.write(buf, 0, n);
    }
    out.close();
    in.close();
    byte[] response = out.toByteArray();
    FileOutputStream fos = new FileOutputStream("C://captcha.jpg");
    fos.write(response);
    fos.close();
  </code></pre>
  
  <p>This does in fact work when I'm using a different URL like a google image, but it doesn't work for my link. I get the Exception: 
  <code>Exception: javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair</code>
  Can this function even work, although the link doesn't end on ".png"?</p>