Posts

Showing posts with the label SSL-HTTPS

How HTTPS works:

Image
How HTTPS works: Phase 1: TLS Handshake (Secure Channel Setup) Phase 2: HTTPS Communication (Encrypted Data Transfer) Phase 1: TLS Handshake (Secure Channel Setup) Step 1: Client Hello  The browser (client) sends an HTTPS request to the server.  It includes:    A random number (`client_random`)    A list of supported cipher suites (e.g., ECDHE-RSA, ECDHE-ECDSA)    TLS version info  Step 2: Server Hello  The server responds with:    Another random number (`server_random`)    A selected cipher suite (e.g., ECDHE-RSA, ECDHE-ECDSA)    Its digital certificate (contains public key and domain info)  Step 3: Certificate Validation (Browser Side)  The browser verifies the server certificate:    Is it issued by a trusted Certificate Authority (CA)?    Is it not expired?    Is the domain name correct?    If valid → continue.    If not → browser shows a "connec...

SSL - HTTPS, Topics.

Image
  SSL - HTTPS, Introduction. SSL - HTTPS, SSL Command. SSL - HTTPS, Project Creation.

01. SSL - HTTPS, Introduction.

Image
  HTTPS Different teams which we can to secure a web service. SSL- secure socket layer TSL- Transport secure layer (More features added than SSL, Lot of certificates are created using TLS)   TrustStore and KeyStore TrustStore - Certificate related to public information. KeyStore- Certificate related to private information.   HPPTS (Hypertext transfer protocol secure) යනු HTTP හි secure version එක වන අතර එහි secure කියන එක ලගා කරගනු ලබනුයේ data encrypted කර transfer කිරීම මගින් වේ (secure communication between two parties by using the encryption mechanism it has).   How Spring boot HTTPS works? HTTPS is used to make secure communication between two parties by using the encryption mechanism it has. In the case of SSL, it generates and HTTPS it generates an SSL certificate that contains the public and the private key, and other information which is needed to make it secure. Now we will see how HTTPs works internally to secure the transfer of d...

02.SSL - HTTPS, SSL Command.

Image
  SSL - HTTPS, SSL Command. REF:  https://docs.oracle.com/cd/E19830-01/819-4712/ablqw/index.html#:~:text=jks%2C%20contains%20the%20Application%20Server%27s%20trusted%20certificates%2C%20including%20public%20keys,of%20certification%20authorities%20(CAs). https://www.thomasvitale.com/https-spring-boot-ssl-certificate/ https://www.educba.com/spring-boot-https/ keystore of type JKS using an RSA key algorithm. RSA is public-key encryption technology developed by RSA Data Security, Inc keytool -genkey -noprompt -trustcacerts -keyalg RSA -alias ${cert.alias} -dname  ${dn.name} -keypass ${key.pass} -keystore ${keystore.file} -storepass ${keystore.pass} Create a self-signed certificate in a keystore of type JKS using the default key algorithm. keytool -genkey -noprompt -trustcacerts -alias ${cert.alias} -dname ${dn.name} -keypass ${key.pass} -keystore ${keystore.file} -storepass ${keystore.pass} Example: keytool -genkey -alias keyAlias -keyalg RSA -keypass changeit -storepass chan...

03. SSL - HTTPS, Project Creation.

Image
 SSL - HTTPS, Project Creation. GitHub link : https://github.com/LahiruPriyankara/SSL-SpringBoot Create a spring boot project by adding web dependencies Then create keypair Add it to project class path  Add bellow configuration and run the project.