I am trying to download public key certificates from the certificate authority website. The .cer and .crt files I am getting from my program are slightly incorrect. I assume there is a problem with the setRequestProperty. At the moment I am not setting any because when I try to set it as something like conn.setRequestProperty("Content-Type", "application/x-509-ca-cert"); the Buffer reader never gets any data from the website.
I know the data I am getting is wrong because when comparing the output from the application to the file I downloaded by hand from the site, there is a slight difference. It also says that it is an invalid certificate when I try to do anything with it.