Donate to us via Paypal!
You cannot teach a man anything; you can only help him find it within himself. - Galileo
Wednesday, March 03, 2021
Navigation
Home
 Find:
 Information:
Learn
Communicate
Submit
Shop
Challenges
 Exploit:
 Programming:
 Think:
 Track:
 Patch:
 Other:
 Need Help?
Other
Members Online
Total Online: 120
Guests Online: 119
Members Online: 1

Registered Members: 133808
Newest Member: LarryNuh
Latest Articles

View Thread

HellBound Hackers | Computer General | Programming

Author

Reading from HTTPS in Java

clansfear
Member

Your avatar

Posts: 5
Location:
Joined: 02.09.15
Rank:
Monster
Posted on 21-09-15 16:29
Hello,
I've been coding in java for quite some time now, but for the first time I need to connect to a https . I know there is HttpsUrlConnection class and I've used it but I'm getting SSLHandshakeException no matter what I do with it.
Now I've never done it before so it isn't intuitive for me but I guess i'm missing certification. I don't really know how to go about it, the Internet is saying about keychains but it doesn't really make sense to me, do you know any resource that could explain me what and why I should do?
Author

RE: Reading from HTTPS in Java

rex_mundi
☆ Lucifer ☆



Posts: 2018
Location: Scotland
Joined: 20.02.08
Rank:
God
Posted on 21-09-15 17:31
Maybe one of those will help you ?

http://stackoverf. . .connection

http://stackoverf. . .tion-error

Edited by rex_mundi on 21-09-15 17:44
U N ⓡⓔⓧ_ⓜⓤⓝⓓⓘ
Author

RE: Reading from HTTPS in Java

CapnDelete
Member



Posts: 10
Location:
Joined: 07.09.15
Rank:
Moderate
Posted on 21-09-15 22:27
I've found that when I'm having an issue with the code, it's generally because I don't understand the basics of what I'm trying to implement. I would google SSL or youtube if you're more of a visual learner. I think once you understand how SSL works, suddenly those problems are solved. Don't focus on Java SSL, focus on SSL in general.
Author

RE: Reading from HTTPS in Java

clansfear
Member

Your avatar

Posts: 5
Location:
Joined: 02.09.15
Rank:
Monster
Posted on 21-09-15 22:27
I saved the certificate with chrome and added it to my keystore with keytool and I still get the error. Then I tried to disable the security altogether but I didn't even understand what I'm doing and it still gave me the exception ... I'm sure that's some basic oversight of mine, it can't be that hard to connect to https.

EDIT: As you posted right when I did - I'll read on SSL. I'm still worried that I will have difficulties implementing it in Java tho.

Edited by clansfear on 21-09-15 22:29
Author

RE: Reading from HTTPS in Java

Huitzilopochtli
Member



Posts: 1644
Location:
Joined: 19.02.13
Rank:
God
Posted on 21-09-15 23:06
http://www.rgagno. . .HTTPS.html
Author

RE: Reading from HTTPS in Java

clansfear
Member

Your avatar

Posts: 5
Location:
Joined: 02.09.15
Rank:
Monster
Posted on 21-09-15 23:32
Thanks for all your help guys, I managed to read dozens of https sites and now I actually know how does it work. There is still a thing that boggles my mind - it doesn't work with hellboundhackers. I still get the same good ol' exception with failed handshake. Why doesn't this page want to welcome my app? Sad
Author

RE: Reading from HTTPS in Java

rex_mundi
☆ Lucifer ☆



Posts: 2018
Location: Scotland
Joined: 20.02.08
Rank:
God
Posted on 21-09-15 23:52
There are plenty of java coders on the site, someone will post the answer sooner or later.
U N ⓡⓔⓧ_ⓜⓤⓝⓓⓘ
Author

RE: Reading from HTTPS in Java

FikretPhh
Member

Your avatar

Posts: 6
Location:
Joined: 15.08.11
Rank:
God
Posted on 22-09-15 22:57
From the top of my head:
- check if u added the certificate to java trust store "cacerts", should be in jre/lib/security folder, also check if you have the right jdk on the OS path.

You can try running the program with -Djavax.net.ssl.trustStore="path/to/trust/store"

Don't forget the "" when adding the path, if you are using windows, and have spaces in your path, it's not gonna find it.

You can PM me freely.
Author

RE: Reading from HTTPS in Java

clansfear
Member

Your avatar

Posts: 5
Location:
Joined: 02.09.15
Rank:
Monster
Posted on 23-09-15 02:38
I tried all the methods and sent you a PM, as it still doesn't work -.-
If there is anyone else with some bright idea, I'd love to hear it.