SSL-Client-Server | A simple Java SSL/TSL socket client and server demo | TLS library
kandi X-RAY | SSL-Client-Server Summary
kandi X-RAY | SSL-Client-Server Summary
he standard SSL Handshake.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Main function
- Process the input
- Main entry point
- Parses kk connection
SSL-Client-Server Key Features
SSL-Client-Server Examples and Code Snippets
Community Discussions
Trending Discussions on SSL-Client-Server
QUESTION
So I'm wanting to set up an SSL server/client in Java, my knowledge with networking is not very good I've created normal servers/clients in java many times and wanted to up it and setup SSL so a user can't just send false packets to my client thinking its the server sending them.
I've looked up a few examples etc and came across this GitHub repo which shows a basic server with SSL encryption between the client and server and set it up in my IDE. Here is the repo: https://github.com/AlphaGarden/SSL-Client-Server
My question is why does the client and server use both certificates? Can't a user just get the certificates from the client and use them to decrypt the SSL? Also in the client there's 2 strings, password & password2... Am I supposed to hide these from the person using my client too? If not am I supposed to hide anything client sided from the user that could help them decrypt the SSL traffic and feed my client false information?
...ANSWER
Answered 2020-Oct-24 at 13:23Just some basics to explain a SSL/TLS connection: Wkipedia https://en.wikipedia.org/wiki/Transport_Layer_Security, for TLS 1.2 RFC5246: https://tools.ietf.org/html/rfc5246 and for TLS 1.3 RFC8446 https://tools.ietf.org/html/rfc8446.
The basic principle for a secure connection is to use (each) a certificate on server and client's side and exchange them. The certificate itself is useless as it does not prove that you are whom you say to be. To get trust in the certificate the usual way is to "buy" a certificate from a Certificate Agency (CA) that checks your identity.
The CA's root certificate usually is known to today browsers and so the server and client certificate can get checked by the browser (client) and server against the CA's root certificate.
Let us see the code for the simple SSL Server & Client code. I'm for sure you noticed that the server and client are using "twisted" sources for the keystore and the truststore and therefore they need two (different) passwords to get access to the two stores:
SSLServer:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install SSL-Client-Server
You can use SSL-Client-Server like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the SSL-Client-Server component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page