Author Topic: JAVA and https not possible  (Read 1789 times)

Jan-Erik Lärka

  • Global Moderator
  • Full Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 15
  • Posts: 198
    • View Profile
JAVA and https not possible
« on: September 04, 2016, 10:11:51 pm »
I'm trying to use java in OpenJDK6 to fetch packages for me, but it refuse since the cacert miss information.
How can I overcome this in OS/2 - eCS?
What do I have to do and how? (Step-by-step)

Code: [Select]
SDK Manager repository: manifest cache cleared.
Refresh Sources:
  Fetching https://dl.google.com/android/repository/addons_list-2.xml
  Failed to fetch URL https://dl.google.com/android/repository/addons_list-2.xml
, reason: peer not authenticated
  Fetched Add-ons List successfully
  Refresh Sources
  Fetching URL: https://dl.google.com/android/repository/repository-11.xml
  Failed to fetch URL https://dl.google.com/android/repository/repository-11.xml
, reason: SSLPeerUnverified peer not authenticated

Joop

  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 50
  • Posts: 520
    • View Profile
Re: JAVA and https not possible
« Reply #1 on: September 04, 2016, 10:49:32 pm »
I'm not sure what you want to do, but in Java you need a special program for downloading because there are sha1 checks in it. I don't have problems with other programs which use the www for something. So the problem is not with Java but with the program you use inside Java. A common seen bug is error=2 which is as much that the program can't find the browser. Sometimes there is a workaround, but with most tested programs with this bug its just game over.

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 11
  • -Receive: 167
  • Posts: 2341
    • View Profile
Re: JAVA and https not possible
« Reply #2 on: September 04, 2016, 11:01:10 pm »
Looks like a bug and an issue should be filed at netlabs.
You could try using a cacerts from an older or different versio of Java. eg I see an almost 30k cacerts in JAVA142\lib\security. Try copying it over after saving the empty cacerts.
Doing some googling, it seems a common problem, usually fixed by pointing at the OSes certs, which we don't have. eg see http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=270.
There are places that you can download them from but I'd be really careful to get them from a trusted source,

Jan-Erik Lärka

  • Global Moderator
  • Full Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 15
  • Posts: 198
    • View Profile
Re: JAVA and https not possible
« Reply #3 on: September 05, 2016, 09:20:42 pm »
Thanks Dave and Joop,

I also read many of those instructions on the net, but just as you state have different solutions.
I did follow your advice to borrow the file from innotek java, but it was to old as it required support libraries that I couldn't find in a haste.
I ended up with cacert from another system with a recent file and it worked (111k from Aug 31, 2016).
I'm now downloading the google android sdk to this computer at the same time as I listen to music (PM123) and write this.  ;D

I also registered a new ticket #241 on netlabs https://trac.netlabs.org/java/ticket/241 that's related to this.

Regards,
//Jan-Erik